mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Scaling: Replaced all Theme.uiScale by Theme.scale(Screen) so stuff scale accordingly to the Screen used by the Item/component
This commit is contained in:
@@ -7,22 +7,22 @@ import qs.Components
|
||||
|
||||
Rectangle {
|
||||
id: card
|
||||
width: 200 * Theme.uiScale
|
||||
height: 70 * Theme.uiScale
|
||||
width: 200 * Theme.scale(Screen)
|
||||
height: 70 * Theme.scale(Screen)
|
||||
color: Theme.surface
|
||||
radius: 18 * Theme.uiScale
|
||||
radius: 18 * Theme.scale(Screen)
|
||||
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 20 * Theme.uiScale
|
||||
spacing: 20 * Theme.scale(Screen)
|
||||
|
||||
|
||||
Rectangle {
|
||||
width: 36 * Theme.uiScale; height: 36 * Theme.uiScale
|
||||
radius: 18 * Theme.uiScale
|
||||
width: 36 * Theme.scale(Screen); height: 36 * Theme.scale(Screen)
|
||||
radius: 18 * Theme.scale(Screen)
|
||||
border.color: Theme.accentPrimary
|
||||
border.width: 1 * Theme.uiScale
|
||||
border.width: 1 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.Performance)
|
||||
? Theme.accentPrimary
|
||||
: (perfMouseArea.containsMouse ? Theme.accentPrimary : "transparent")
|
||||
@@ -33,7 +33,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
text: "speed"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 22 * Theme.uiScale
|
||||
font.pixelSize: 22 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.Performance) || perfMouseArea.containsMouse
|
||||
? Theme.backgroundPrimary
|
||||
: Theme.accentPrimary
|
||||
@@ -65,10 +65,10 @@ Rectangle {
|
||||
|
||||
|
||||
Rectangle {
|
||||
width: 36 * Theme.uiScale; height: 36 * Theme.uiScale
|
||||
radius: 18 * Theme.uiScale
|
||||
width: 36 * Theme.scale(Screen); height: 36 * Theme.scale(Screen)
|
||||
radius: 18 * Theme.scale(Screen)
|
||||
border.color: Theme.accentPrimary
|
||||
border.width: 1 * Theme.uiScale
|
||||
border.width: 1 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.Balanced)
|
||||
? Theme.accentPrimary
|
||||
: (balMouseArea.containsMouse ? Theme.accentPrimary : "transparent")
|
||||
@@ -79,7 +79,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
text: "balance"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 22 * Theme.uiScale
|
||||
font.pixelSize: 22 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.Balanced) || balMouseArea.containsMouse
|
||||
? Theme.backgroundPrimary
|
||||
: Theme.accentPrimary
|
||||
@@ -111,10 +111,10 @@ Rectangle {
|
||||
|
||||
|
||||
Rectangle {
|
||||
width: 36 * Theme.uiScale; height: 36 * Theme.uiScale
|
||||
radius: 18 * Theme.uiScale
|
||||
width: 36 * Theme.scale(Screen); height: 36 * Theme.scale(Screen)
|
||||
radius: 18 * Theme.scale(Screen)
|
||||
border.color: Theme.accentPrimary
|
||||
border.width: 1 * Theme.uiScale
|
||||
border.width: 1 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.PowerSaver)
|
||||
? Theme.accentPrimary
|
||||
: (saveMouseArea.containsMouse ? Theme.accentPrimary : "transparent")
|
||||
@@ -125,7 +125,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
text: "eco"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 22 * Theme.uiScale
|
||||
font.pixelSize: 22 * Theme.scale(Screen)
|
||||
color: (typeof PowerProfiles !== 'undefined' && PowerProfiles.profile === PowerProfile.PowerSaver) || saveMouseArea.containsMouse
|
||||
? Theme.backgroundPrimary
|
||||
: Theme.accentPrimary
|
||||
|
||||
Reference in New Issue
Block a user