Use font: instead of font.pointSize: where possible
ClosedPublic

Authored by ngraham on May 4 2020, 11:27 PM.

Details

Summary

Otherwise we're discarding style information possibly set in
the user's small font choices when we want to set a smaller
font.

Test Plan

Stuff that's suposta look small still looks small

Diff Detail

Repository
R120 Plasma Workspace
Branch
use-the-whole-font (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26360
Build 26378: arc lint + arc unit
ngraham created this revision.May 4 2020, 11:27 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 4 2020, 11:27 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.May 4 2020, 11:27 PM
apol added a subscriber: apol.May 5 2020, 12:56 PM

You can do that now but this behaviour is deprecated and disallowed in Qt 6 AFAIK.

I don't know a better way of doing this, so +0 from me.

So you can't set font: in Qt6 or something? Would we have to do this?

font.pointSize: theme.smallestFont.pointSize
font.styleName: theme.smallestFont.styleName

Actually I'm fairly sure font: someFont is still going to work, it's font.something: somethingElse syntax that's going away, instead becoming something like font: Font { something: somethingElse }.

Oh, so then this patch is in fact an accidental Qt6 readiness patch? :)

So is this good to go?

cblack accepted this revision.May 19 2020, 4:14 PM
This revision is now accepted and ready to land.May 19 2020, 4:14 PM
ngraham closed this revision.May 19 2020, 4:19 PM