fix overlapping labels on systems with different window sizes

Authored by sitter on Nov 8 2017, 1:25 PM.

Description

fix overlapping labels on systems with different window sizes

Summary:
it is not quite clear to me why a Window may have a Y != 0 to begin with,
but it happens and can in fact happen even though only uniform screens
are attached (I suspect some GRUB resolution handover problem which for
some reasons persists through modesetting, though that's really just a
guess). So on a 1920x1080 screen Window[0] can be 1024x768 with a Y
such that it is centered on the effectively larger screen. While that is
altogether insane we do handle window offsets when placing our Logo,
relative to that we place our Spinner and relative to that we place
the label offset. Previously we didn't take into account the Window offset
when calculating the "scootyness" of the label offset (i.e. if the label
would likely exceed the window it gets scooted around as to preserve
readability) which resulted in us placing our offset entirely incorrectly
(off by whatever the window y is).

Easy fix: take the Window Y into account when checking for the need of
scooting. This aligns the window frame expectations between Logo and
label offset making it less likely to have text overlap when none is needed

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D8721

Details

Committed
sitterNov 14 2017, 12:01 PM
Differential Revision
D8721: fix overlapping labels on systems with different window sizes
Parents
R526:095c88117db2: Update version number for 5.8.8 GIT_SILENT
Branches
Unknown
Tags
Unknown