The session selector's and keyboard layout's menus are now styled to resemble the Breeze theme rather than the default QML style.
BUG: 408702
filipf |
VDG |
The session selector's and keyboard layout's menus are now styled to resemble the Breeze theme rather than the default QML style.
BUG: 408702
Ensure the styling looks good regardless of various conditions. (resolution, dpi, distro, amount of sessions, etc.)
No Linters Available |
No Unit Test Coverage |
Buildable 12821 | |
Build 12839: arc lint + arc unit |
It would be useful if you provide a screenshot of the result so people can assess the change properly.
sddm-theme/SessionButton.qml | ||
---|---|---|
48 ↗ | (On Diff #59771) | You're hard-coding colors, this will break as soon as the style is changed. |
Awesome, the look of that menu has been a thorn in my side! Code needs some modifications, but it looks great.
Can you also apply this patch to KeyboardButton.qml as we've got another QQC menu there?
sddm-theme/SessionButton.qml | ||
---|---|---|
48 ↗ | (On Diff #59771) | No need to hardcode here, instead set: color: PlasmaCore.ColorScope.backgroundColor |
53 ↗ | (On Diff #59771) | Same, you can set: color: styleData.selected ? PlasmaCore.ColorScope.highlightedTextColor : PlasmaCore.ColorScope.textColor |
55 ↗ | (On Diff #59771) | For this label we should also add: font.pointSize: config.fontSize This will make sure the size of the labels is the same as the one used for the button label. |
58 ↗ | (On Diff #59771) | PlasmaCore.ColorScope.highlightColor |
59 ↗ | (On Diff #59771) | Just remove this, you would be trying to mimic the PlasmaComponents.Highlight with it, but that's not what we use in menus in the desktop. |
sddm-theme/SessionButton.qml | ||
---|---|---|
51 ↗ | (On Diff #59771) | Also, do we need this? |
As requested by @apol, here is a screenshot of the menu with the new styling (I'm using a custom colorscheme currently, which is why the menu appears black in this screenshot).
sddm-theme/SessionButton.qml | ||
---|---|---|
51 ↗ | (On Diff #59771) | The extra padding makes it resemble the Breeze menus found in normal applications a bit more. (Also larger space to click on) |
Thanks for the new version, almost there.
sddm-theme/KeyboardButton.qml | ||
---|---|---|
25 | One more thing that I realized is missing here and that would make everything look like the desktop menus is a 1px border. Now the stolen code should sort of look like this: property color borderColor: PlasmaCore.ColorScope.textColor border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3) border.width: 1 Unfortunately for some reason rgba fails when using dark themes and the border just turns white. Maybe you could figure out something better, but if you get stuck it's not super important. | |
39 | We still need to remove this bit of hardcoding: color: PlasmaCore.ColorScope.highlightColor and in the other file as well, of course. |
Menu border, less hardcoding, and moving the menu style into a seperate file to reduce duplicated code.
Final comments and then it's a ship it from me!
sddm-theme/BreezeMenuStyle.qml | ||
---|---|---|
12 ↗ | (On Diff #59806) | It's still not working right with dark themes: What do you say we steal the code for kirigami's separator color?
border.color: Qt.tint(PlasmaCore.ColorScope.textColor, Qt.rgba(color.r, color.g, color.b, 0.7)) looks good now IMO: |
18 ↗ | (On Diff #59806) | there's whitespace here |
21 ↗ | (On Diff #59806) | whitespace here as well |
Thanks again :)
Do you have commit access?
sddm-theme/BreezeMenuStyle.qml | ||
---|---|---|
11 ↗ | (On Diff #59808) | This can be removed now |
sddm-theme/BreezeMenuStyle.qml | ||
---|---|---|
6 ↗ | (On Diff #59808) | Why does this have to be QQC1? |
sddm-theme/BreezeMenuStyle.qml | ||
---|---|---|
6 ↗ | (On Diff #59808) | AFAIK we can't style QQC2 Menus :/ There's also another non-style error that pops up. I would suggest to consider import porting for some future date. |
@cblack great patch, keep it up!
I pushed it to the 5.16 branch so we should already see this improvement in 5.16.1.