Add scaling to everything, edit SidePanel

This commit is contained in:
Ly-sec 2025-08-07 15:38:27 +02:00
parent 68d7add474
commit 0b49aff13d
52 changed files with 3138 additions and 3043 deletions

View file

@ -6,21 +6,21 @@ import qs.Components
Rectangle {
id: root
width: 64
height: 32
radius: 16
width: 64 * Theme.uiScale
height: 32 * Theme.uiScale
radius: 16 * Theme.uiScale
color: Theme.surfaceVariant
border.color: Theme.outline
border.width: 1
border.width: 1 * Theme.uiScale
property bool useFahrenheit: Settings.settings.useFahrenheit
Rectangle {
id: slider
width: parent.width / 2 - 4
height: parent.height - 4
radius: 14
width: parent.width / 2 - 4 * Theme.uiScale
height: parent.height - 4 * Theme.uiScale
radius: 14 * Theme.uiScale
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
font.pixelSize: 13 * Theme.uiScale
font.bold: !useFahrenheit
color: !useFahrenheit ? Theme.onAccent : Theme.textPrimary
@ -74,7 +74,7 @@ Rectangle {
Text {
anchors.centerIn: parent
text: "°F"
font.pixelSize: 13
font.pixelSize: 13 * Theme.uiScale
font.bold: useFahrenheit
color: useFahrenheit ? Theme.onAccent : Theme.textPrimary

View file

@ -58,7 +58,7 @@ Rectangle {
id: wallpaperGrid
anchors.fill: parent
cellWidth: Math.max(120, (parent.width / 3) - 12)
cellWidth: Math.max(120 * Theme.uiScale, (parent.width / 3) - 12 * Theme.uiScale)
cellHeight: cellWidth * 0.6
model: WallpaperManager.wallpaperList
cacheBuffer: 64
@ -68,8 +68,8 @@ Rectangle {
bottomMargin: 8
delegate: Item {
width: wallpaperGrid.cellWidth - 8
height: wallpaperGrid.cellHeight - 8
width: wallpaperGrid.cellWidth - 8 * Theme.uiScale
height: wallpaperGrid.cellHeight - 8 * Theme.uiScale
Rectangle {
id: wallpaperItem
@ -77,9 +77,9 @@ Rectangle {
anchors.fill: parent
anchors.margins: 3
color: Theme.surface
radius: 12
radius: 12 * Theme.uiScale
border.color: Settings.settings.currentWallpaper === modelData ? Theme.accentPrimary : Theme.outline
border.width: 2
border.width: 2 * Theme.uiScale
Image {
id: wallpaperImage
@ -92,8 +92,8 @@ Rectangle {
cache: true
smooth: true
mipmap: true
sourceSize.width: Math.min(width, 480)
sourceSize.height: Math.min(height, 270)
sourceSize.width: Math.min(width, 480 * Theme.uiScale)
sourceSize.height: Math.min(height, 270 * Theme.uiScale)
opacity: (wallpaperImage.status == Image.Ready) ? 1 : 0
// Apply circular mask for rounded corners
layer.enabled: true
@ -123,7 +123,7 @@ Rectangle {
Rectangle {
width: wallpaperImage.width
height: wallpaperImage.height
radius: 12
radius: 12 * Theme.uiScale
}
}