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:
parent
3148dc62a0
commit
cb74b6e5d5
50 changed files with 564 additions and 568 deletions
|
|
@ -7,20 +7,20 @@ import qs.Settings
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: 64 * Theme.uiScale
|
||||
height: 32 * Theme.uiScale
|
||||
radius: 16 * Theme.uiScale
|
||||
width: 64 * Theme.scale(Screen)
|
||||
height: 32 * Theme.scale(Screen)
|
||||
radius: 16 * Theme.scale(Screen)
|
||||
color: Theme.surfaceVariant
|
||||
border.color: Theme.outline
|
||||
border.width: 1 * Theme.uiScale
|
||||
border.width: 1 * Theme.scale(Screen)
|
||||
|
||||
property bool useFahrenheit: Settings.settings.useFahrenheit
|
||||
|
||||
Rectangle {
|
||||
id: slider
|
||||
width: parent.width / 2 - 4 * Theme.uiScale
|
||||
height: parent.height - 4 * Theme.uiScale
|
||||
radius: 14 * Theme.uiScale
|
||||
width: parent.width / 2 - 4 * Theme.scale(Screen)
|
||||
height: parent.height - 4 * Theme.scale(Screen)
|
||||
radius: 14 * Theme.scale(Screen)
|
||||
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.uiScale
|
||||
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.uiScale
|
||||
font.pixelSize: 13 * Theme.scale(Screen)
|
||||
font.bold: useFahrenheit
|
||||
color: useFahrenheit ? Theme.onAccent : Theme.textPrimary
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Rectangle {
|
|||
id: wallpaperGrid
|
||||
|
||||
anchors.fill: parent
|
||||
cellWidth: Math.max(120 * Theme.uiScale, (parent.width / 3) - 12 * Theme.uiScale)
|
||||
cellWidth: Math.max(120 * Theme.scale(Screen), (parent.width / 3) - 12 * Theme.scale(Screen))
|
||||
cellHeight: cellWidth * 0.6
|
||||
model: WallpaperManager.wallpaperList
|
||||
cacheBuffer: 64
|
||||
|
|
@ -67,8 +67,8 @@ Rectangle {
|
|||
bottomMargin: 8
|
||||
|
||||
delegate: Item {
|
||||
width: wallpaperGrid.cellWidth - 8 * Theme.uiScale
|
||||
height: wallpaperGrid.cellHeight - 8 * Theme.uiScale
|
||||
width: wallpaperGrid.cellWidth - 8 * Theme.scale(Screen)
|
||||
height: wallpaperGrid.cellHeight - 8 * Theme.scale(Screen)
|
||||
|
||||
Rectangle {
|
||||
id: wallpaperItem
|
||||
|
|
@ -76,9 +76,9 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
anchors.margins: 3
|
||||
color: Theme.surface
|
||||
radius: 12 * Theme.uiScale
|
||||
radius: 12 * Theme.scale(Screen)
|
||||
border.color: Settings.settings.currentWallpaper === modelData ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 2 * Theme.uiScale
|
||||
border.width: 2 * Theme.scale(Screen)
|
||||
|
||||
Image {
|
||||
id: wallpaperImage
|
||||
|
|
@ -91,8 +91,8 @@ Rectangle {
|
|||
cache: true
|
||||
smooth: true
|
||||
mipmap: true
|
||||
sourceSize.width: Math.min(width, 480 * Theme.uiScale)
|
||||
sourceSize.height: Math.min(height, 270 * Theme.uiScale)
|
||||
sourceSize.width: Math.min(width, 480 * Theme.scale(Screen))
|
||||
sourceSize.height: Math.min(height, 270 * Theme.scale(Screen))
|
||||
opacity: (wallpaperImage.status == Image.Ready) ? 1 : 0
|
||||
// Apply circular mask for rounded corners
|
||||
layer.enabled: true
|
||||
|
|
@ -122,7 +122,7 @@ Rectangle {
|
|||
Rectangle {
|
||||
width: wallpaperImage.width
|
||||
height: wallpaperImage.height
|
||||
radius: 12 * Theme.uiScale
|
||||
radius: 12 * Theme.scale(Screen)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue