[sddm-theme/lock screen] Overhaul font sizes
ClosedPublic

Authored by rooty on Mar 9 2019, 8:53 AM.

Details

Summary

This patch:

  • tells the login screen to modify the font size specified in theme.conf and the lock screen to modify the user's default theme's font size instead
  • makes sure that the login screen session and keyboard buttons take this new approach too
  • raises the font size of "Start New Session" on the lock screen (to match the rest)
  • raises the artist/track font sizes (to match the password field)
Test Plan

This patch resolves the problem of

(1) The fonts on the login screen and

(2) the fonts on the lock screen

not having matching sizes.

Diff Detail

Repository
R120 Plasma Workspace
Branch
arcpatch-D19631
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9666
Build 9684: arc lint + arc unit
There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a project: Plasma. · View Herald TranscriptMar 9 2019, 8:53 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
rooty requested review of this revision.Mar 9 2019, 8:53 AM
rooty edited the summary of this revision. (Show Details)Mar 9 2019, 9:03 AM
rooty edited the test plan for this revision. (Show Details)
rooty added reviewers: VDG, Plasma, ngraham, filipf.
rooty edited the summary of this revision. (Show Details)
rooty edited the test plan for this revision. (Show Details)
filipf requested changes to this revision.Mar 9 2019, 9:53 AM

There has to be a better solution. We're dragging the quality of Plasma down simply because SDDM isn't on par with it. If there's no other way, hardcoded font sizes should only be present in SDDM.

This revision now requires changes to proceed.Mar 9 2019, 9:53 AM
rooty added a comment.Mar 9 2019, 10:07 AM

There has to be a better solution. We're dragging the quality of Plasma down simply because SDDM isn't on par with it. If there's no other way, hardcoded font sizes should only be present in SDDM.

I'm actually not really sure about this being a bad solution.
Hardcoding font sizes gives us total control over our environment, which might not be a bad thing in the long run (in case we want to hard-code settings that point to a .conf file, for greater versatility).
As far as the lock screen goes, if you separate the SDDM font sizes from the lock screen font sizes, there's a glaring inconsistency between them.

There has to be a better solution. We're dragging the quality of Plasma down simply because SDDM isn't on par with it. If there's no other way, hardcoded font sizes should only be present in SDDM.

I'm actually not really sure about this being a bad solution
Hardcoding font sizes gives us total control over our environment, which might not be a bad thing in the long run (in case we want to hard-code settings that point to a .conf file, for greater versatility).

What hardcoding font sizes gives us are 2 places in Plasma losing their flexibility and not taking the user's preferences into consideration = SDDM-ing it. The core reason isn't strong enough either, especially given that SDDM is not a pre-requisite for using Plasma.

As far as the lock screen goes, if you separate the SDDM font sizes from the lock screen font sizes, there's a glaring inconsistency between them.

Frankly I'd rather have inconsistency than hardcoded font sizes in Plasma.

rooty added a comment.EditedMar 9 2019, 12:13 PM

What hardcoding font sizes gives us are 2 places in Plasma losing their flexibility and not taking the user's preferences into consideration = SDDM-ing it.

Then the solution is obvious - we should make the sddm theme (SDDM itself) more customizable (theme.conf?).

The core reason isn't strong enough either, especially given that SDDM is not a pre-requisite for using Plasma.

What do you mean? I never implied it was.

Frankly I'd rather have inconsistency than hardcoded font sizes in Plasma.

I would rather not.

rooty updated this revision to Diff 53518.Mar 9 2019, 3:37 PM
rooty edited the summary of this revision. (Show Details)

(WIP) Switch back to the default theme font + 1 (or 2) for the lock screen

rooty added a comment.Mar 9 2019, 3:39 PM

Can anyone please help - how do I tell Main.qml to set the integer "nameFontSize" to 12 pt? My knowledge here is very limited and nothing I've tried has worked :/

rooty retitled this revision from [sddm-theme/lock screen] Overhaul font sizes to [sddm-theme/lock screen] WIP, Overhaul font sizes.Mar 9 2019, 3:39 PM

I don't think we should use hardcoded font sizes in either place. Maybe what we should do is have both of them use font.pointSize: theme.defaultFont.pointSize + 1 (etc.). That way they will both use the same font sizes unless the user changes that. There will be some inconsistency if the user does change the font size, but that's unavoidable right now. And even if we hardcode sizes for both of them, we'd never be able to match the actual font itself in the case that the user changes it. It's currently an unsolvable problem.

Long term, what I would like to do is that when there is only a single user on the system, SDDM automatically reads font, cursor, and theme information from the user's account. For security, maybe the way this is implemented is that when that user makes any changes to those settings, they get copied into the SDDM user's home directory rather than SDDM reading from the user's home directory. This behavior should be user-configurable and able to be turned off, and automatically turn itself (with no ability to turn it back on) off when there is more than one user on the system.

Otherwise there will always be a measure of inconsistency between the lock and login screens.

rooty added a comment.Mar 9 2019, 4:33 PM

I don't think we should use hardcoded font sizes in either place. Maybe what we should do is have both of them use font.pointSize: theme.defaultFont.pointSize + 1 (etc.).

Yes that was the idea in D19547, but we can't because sddm doesn't recognize theme.defaultFont.pointSize.
So the point of this patch was to hardcode them in the sddm theme and let the lock screen do its own thing.

I don't think we should use hardcoded font sizes in either place. Maybe what we should do is have both of them use font.pointSize: theme.defaultFont.pointSize + 1 (etc.).

Yes that was the idea in D19547, but we can't because sddm doesn't recognize theme.defaultFont.pointSize.

Hmm, why not? Wouldn't the SDDM user just have its own value for that?

rooty added a comment.Mar 9 2019, 4:37 PM

I don't think we should use hardcoded font sizes in either place. Maybe what we should do is have both of them use font.pointSize: theme.defaultFont.pointSize + 1 (etc.).

Yes that was the idea in D19547, but we can't because sddm doesn't recognize theme.defaultFont.pointSize.

Hmm, why not? Wouldn't the SDDM user just have its own value for that?

I have no idea. It should.
It's not just the sddm user - "sudo sddm-greeter" doesn't either. I'm stumped.

filipf added a comment.Mar 9 2019, 4:56 PM

Something's odd. It's not that the +1 and the +2 code isn't working, but it's as if theme.defaultFont.pointSize is actually 9pt in SDDM.

Lock screen:

SDDM:

You see that in the case of action buttons it's 10pt vs 11pt, and in the case of usernames it's 11pt vs 12pt.

rooty added a comment.EditedMar 9 2019, 5:10 PM

Can confirm. theme.defaultFont.pointSize is indeed 9 pt.

rooty updated this revision to Diff 53555.Mar 10 2019, 4:28 AM

Use fixed font size for SDDM theme but not lock screen

rooty updated this revision to Diff 53556.Mar 10 2019, 4:29 AM

Revert changes to UserDelegate.qml (empty line)

rooty updated this revision to Diff 53557.Mar 10 2019, 5:04 AM

Apply theme.conf approach to all modifications

rooty retitled this revision from [sddm-theme/lock screen] WIP, Overhaul font sizes to [sddm-theme/lock screen] Overhaul font sizes.Mar 10 2019, 5:21 AM
rooty edited the summary of this revision. (Show Details)
rooty edited the test plan for this revision. (Show Details)
rooty updated this revision to Diff 53561.Mar 10 2019, 6:34 AM
rooty edited the summary of this revision. (Show Details)

Make the logout screen work too

rooty updated this revision to Diff 53576.Mar 10 2019, 8:42 AM

Simplify

rooty edited the summary of this revision. (Show Details)Mar 10 2019, 8:43 AM
rooty updated this revision to Diff 53577.Mar 10 2019, 8:45 AM

Missed one

Looks good now, but let's see if we could simply change SDDM to default to 10pt like the desktop instead of 9pt. @davidedmundson do you perhaps know where we could change this setting?

rooty updated this revision to Diff 53632.Mar 11 2019, 3:06 AM

Use Math.max instead of OR (works with other distros now)

filipf accepted this revision as: filipf.Mar 15 2019, 12:15 AM

If we're not going to be able to change SDDM's default font, this is the second best solution.

ngraham accepted this revision.Mar 16 2019, 9:48 AM

Yeah, I think this is sane enough now. :)

lookandfeel/contents/lockscreen/MediaControls.qml
127

These changes will worsen the problem of the song/artist name getting cut off when they're even marginally long. I would be in favor of fixing that (in another patch :) ).

This revision is now accepted and ready to land.Mar 16 2019, 9:48 AM
rooty updated this revision to Diff 54005.EditedMar 16 2019, 11:13 AM

Use track and artist style from D17073

rooty marked an inline comment as done.Mar 16 2019, 11:13 AM
rooty added inline comments.
lookandfeel/contents/lockscreen/MediaControls.qml
127

Yes it was huge, sorry

rooty updated this revision to Diff 54012.EditedMar 16 2019, 1:00 PM
rooty marked an inline comment as done.

Make properties less restricted

rooty updated this revision to Diff 54017.EditedMar 16 2019, 3:00 PM

Add battery life font size configuration

rooty updated this revision to Diff 54018.Mar 16 2019, 3:05 PM

Implement changes in keyboard layout button

rooty updated this revision to Diff 54019.Mar 16 2019, 3:08 PM

Make it work for the lock screen too

rooty updated this revision to Diff 54020.Mar 16 2019, 3:09 PM

Remove extra character

filipf accepted this revision.Mar 16 2019, 3:24 PM
ngraham accepted this revision.Mar 16 2019, 4:23 PM

I love it.

This revision was automatically updated to reflect the committed changes.
rooty marked an inline comment as done.Mar 16 2019, 4:54 PM

Not looking good.

Not looking good.

Why does it look different than Neon?

! In D19631#467167, @filipf wrote:

Why does it look different than Neon?

Seems neon have a settings tweak to force more font Noto (especially for sddm).

Cherry picking that...

! In D19631#467167, @filipf wrote:

Why does it look different than Neon?

Seems neon have a settings tweak to force more font Noto (especially for sddm).

Cherry picking that...

We could also increase the width of each of the button's container, basically what this shows I guess is the Shut Down button barely fits in one row. I'll look into it.

We could also increase the width of each of the button's container, basically what this shows I guess is the Shut Down button barely fits in one row. I'll look into it.

+1. I don't see any particular reason why the buttons need to be so close together.