style and high dpi fixes for screen identification OSD
ClosedPublic

Authored by sebas on Sep 13 2016, 1:33 PM.

Details

Summary
  • screen identification osd now uses plasma styling, it's workspace thing
  • simplified the code
  • made it high-dpi compatible
Test Plan

tested on various displays, works fine, also themed now by Plasma

Diff Detail

Repository
R104 KScreen
Branch
sebas/screenid
Lint
No Linters Available
Unit
No Unit Test Coverage
sebas updated this revision to Diff 6690.Sep 13 2016, 1:33 PM
sebas retitled this revision from to style and high dpi fixes for screen identification OSD.
sebas updated this object.
sebas edited the test plan for this revision. (Show Details)
sebas added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 13 2016, 1:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Wouldn't a FrameSvg (or even a Plasma Dialog) make this look more plasma-ish?

sebas added a comment.Sep 13 2016, 2:20 PM

It would, and I played with it, but:

This would need an ARGB window and also fallbacks to opaque components, at that point, we'd be duplicating much of the code in Plasma::Dialog (from plasmaquick). Since this code is hopefully going away for a yet-to-be-designed replacement mechanism, it isn't worth the hassle
I'm not using the existing OSD since it doesn't allow us to place anything on a specific screen (kwin's job to decide), so it's pretty useless here. Extending that to allow what we need would mean going through KWindowSystem as well. I do think it's the proper solution in the end, and it would then also work on Wayland, but it's way too late for 5.8 now.

This patch strikes I think a reasonable balance to make it a bit less ugly for 5.8 at least.

broulik accepted this revision.Sep 13 2016, 2:26 PM
broulik added a reviewer: broulik.

Lgtm. Some nitpicks below.

For some reason the right border is smaller than the other ones (has been the case without this patch already), so maybe QML Rectangle border leaks outside the window or so :/

kcm/qml/OutputIdentifier.qml
37 ↗(On Diff #6690)

width: childrenRect.width + 2 * childrenRect.x to reduce magic numbers

46 ↗(On Diff #6690)

Why not just a Label since you're not using the one thing that makes Heading special (the font size with "level" magic)

47–49 ↗(On Diff #6690)

Remove, you're not setting a top anchor and you set Y already

This revision is now accepted and ready to land.Sep 13 2016, 2:26 PM
sebas updated this revision to Diff 6696.Sep 13 2016, 3:16 PM
sebas edited edge metadata.
  • address Kai's comments
This revision was automatically updated to reflect the committed changes.