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
This commit is contained in:
Nate Graham 2020-04-28 12:29:48 -06:00
parent 6caad6ee2f
commit 85b9aea5b4

View file

@ -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));
}