Get output size with output-geometry() rather than mode size directly
ClosedPublic

Authored by davidedmundson on Apr 29 2017, 5:23 PM.

Details

Summary

We can use output->geometry to get the current mode size with transform
applied simplifying a bunch of code, whilst being currently exactly the
same code.

This also applies the is->horizontal ? width : height to the
displaySwitch button. Fixing a bug if you had a rotated laptop
monitor then pressed the display switch button then it would be using the
wrong geometry.


Real reason for this patch is that if I make geometry() the definitive
call for getting output size with transformations I can then do all the
scaling support in a simple tidy one-line edit.

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Apr 29 2017, 5:23 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 29 2017, 5:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.May 2 2017, 1:35 PM
sebas added a subscriber: sebas.

Cool :)

This revision is now accepted and ready to land.May 2 2017, 1:35 PM
This revision was automatically updated to reflect the committed changes.