fix overlapping labels on systems with different window sizes
ClosedPublic

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

Details

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

Diff Detail

Repository
R526 Breeze theme for Plymouth
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Nov 8 2017, 1:26 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 8 2017, 1:26 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
This revision was automatically updated to reflect the committed changes.