Position output identifiers with respect to scaling factors
ClosedPublic

Authored by romangg on Apr 12 2018, 4:50 PM.

Details

Summary

Respect scaling factors for calculation of screen sizes and by that fix
off-center placement of output identifiers.

Test Plan

Works on X, on Wayland the positioning does not work in any case currently.

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.
romangg created this revision.Apr 12 2018, 4:50 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 12 2018, 4:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
romangg requested review of this revision.Apr 12 2018, 4:50 PM

Is it maybe not necessary at all on Wayland to respect the output scaling factors for the placement? It's difficult to test because the center placement is not possible anyways.

davidedmundson requested changes to this revision.Apr 12 2018, 5:29 PM

Is it maybe not necessary at all on Wayland to respect the output scaling factors for the placement?

It is not necessary to do anything with scaling on wayland. All placement is in logical co-ordinates rather than device co-ordinates. Leave it alone and it will work.

kcm/src/widget.cpp
482

you don't need this

484

Avoid the term scaled.

It could mean scaled from device -> logical, it could be scaled from logical->device.
It's a name that ends up telling you nothing. Use one of the other two terms

This revision now requires changes to proceed.Apr 12 2018, 5:29 PM
romangg updated this revision to Diff 31984.Apr 12 2018, 5:42 PM
  • No scale correction on Wayland
  • Rename variables
romangg marked 2 inline comments as done.Apr 12 2018, 5:43 PM
davidedmundson accepted this revision.Apr 12 2018, 5:44 PM
This revision is now accepted and ready to land.Apr 12 2018, 5:44 PM
This revision was automatically updated to reflect the committed changes.