From 85b9aea5b4ab367c37ea58718441f6c1c99a5415 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 28 Apr 2020 12:29:48 -0600 Subject: [PATCH] Position OSD a bit farther down Summary: A common user complains is that our OSDs--particularly the volume OSD--are too intrusive and get in the way of the screen content. For example when adjusting the volume while watching a full-screen video, the volume change OSD will typically appear right in the middle of an actor's face. D20569 was an attempt to use a horizontal OSD to alleviate this issue. It mostly worked, but IMO it was still positioned too high up. This patch moved the placement down a little bit to make the OSD appear even farther from the center of the screen to make it less likely to I tried not to move it down too far or else it would interfere with subtitles in videos. Test Plan: With D20569: {F8269172} {F8269164} {F8269163} Reviewers: #kwin, #vdg, broulik, ndavis, zzag Reviewed By: #kwin, #vdg, ndavis, zzag Subscribers: meven, ndavis, niccolove, baberts, davidedmundson, filipf, zzag, kori, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D29263 --- placement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/placement.cpp b/placement.cpp index 5e1c66580f..1b21af2fba 100644 --- a/placement.cpp +++ b/placement.cpp @@ -501,9 +501,9 @@ void Placement::placeOnScreenDisplay(AbstractClient *c, const QRect &area) { Q_ASSERT(area.isValid()); - // place at lower 1/3 of the screen + // place at lower area of the screen const int x = area.left() + (area.width() - c->width()) / 2; - const int y = area.top() + 2 * (area.height() - c->height()) / 3; + const int y = area.top() + 2 * area.height() / 3 - c->height() / 2; c->move(QPoint(x, y)); }