[Window/Desktop Switchers] Use PlasmaComponents.Label instead of Text
ClosedPublic

Authored by broulik on Nov 10 2016, 2:25 PM.

Details

Summary

The former uses native text rendering which respects anti-aliasing and hinting settings. It also automatically follows theme colors.
Unfortunately it breaks the font.bold binding, so using font.weight here instead.

BUG: 372218
FIXED-IN: 5.8.4

CHANGELOG: Font rendering in window/desktop switchers now follows anti-aliasing and hinting settings

Test Plan

Verified that all switchers still worked. Also verified that items used plasma colortheme (e.g. white text on dark background on Breeze dark) were properly bolded (initially / when active / always, depending on the layout) and italicized (when minimized).

The QML in there could be significantly cleaned up now that we have TextMetrics and Layouts in QML but this code is 5 years old ;)

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 8073.Nov 10 2016, 2:25 PM
broulik retitled this revision from to [Window/Desktop Switchers] Use PlasmaComponents.Label instead of Text.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, graesslin.
broulik set the repository for this revision to R114 Plasma Addons.
Restricted Application added a project: Plasma. · View Herald TranscriptNov 10 2016, 2:25 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin added inline comments.Nov 10 2016, 2:28 PM
desktopswitchers/previews/contents/ui/main.qml
21–22

this looks slightly wrong. Copy and paste error?

broulik updated this revision to Diff 8074.Nov 10 2016, 2:39 PM

Fix import

mart accepted this revision.Nov 11 2016, 12:28 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Nov 11 2016, 12:28 PM
This revision was automatically updated to reflect the committed changes.