mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Scaling: many improvements and fixes
- radius are not pixels, they should not be scaled - use "screen" instead of "Screen" which helps a lot in some places
This commit is contained in:
@@ -7,20 +7,20 @@ import qs.Settings
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: 64 * Theme.scale(Screen)
|
||||
height: 32 * Theme.scale(Screen)
|
||||
radius: 16 * Theme.scale(Screen)
|
||||
width: 64 * Theme.scale(screen)
|
||||
height: 32 * Theme.scale(screen)
|
||||
radius: 16
|
||||
color: Theme.surfaceVariant
|
||||
border.color: Theme.outline
|
||||
border.width: 1 * Theme.scale(Screen)
|
||||
border.width: 1 * Theme.scale(screen)
|
||||
|
||||
property bool useFahrenheit: Settings.settings.useFahrenheit
|
||||
|
||||
Rectangle {
|
||||
id: slider
|
||||
width: parent.width / 2 - 4 * Theme.scale(Screen)
|
||||
height: parent.height - 4 * Theme.scale(Screen)
|
||||
radius: 14 * Theme.scale(Screen)
|
||||
width: parent.width / 2 - 4 * Theme.scale(screen)
|
||||
height: parent.height - 4 * Theme.scale(screen)
|
||||
radius: 14
|
||||
color: Theme.accentPrimary
|
||||
x: 2 + (useFahrenheit ? parent.width / 2 : 0)
|
||||
y: 2
|
||||
@@ -46,7 +46,7 @@ Rectangle {
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "°C"
|
||||
font.pixelSize: 13 * Theme.scale(Screen)
|
||||
font.pixelSize: 13 * Theme.scale(screen)
|
||||
font.bold: !useFahrenheit
|
||||
color: !useFahrenheit ? Theme.onAccent : Theme.textPrimary
|
||||
|
||||
@@ -74,7 +74,7 @@ Rectangle {
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "°F"
|
||||
font.pixelSize: 13 * Theme.scale(Screen)
|
||||
font.pixelSize: 13 * Theme.scale(screen)
|
||||
font.bold: useFahrenheit
|
||||
color: useFahrenheit ? Theme.onAccent : Theme.textPrimary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user