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 3135 additions and 3040 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ Item {
anchors.centerIn: parent
text: "person"
font.family: "Material Symbols Outlined"
font.pixelSize: 24
font.pixelSize: 24 * Theme.uiScale
color: Theme.onAccent
visible: Settings.settings.profileImage === undefined || Settings.settings.profileImage === ""
z: 0
+2 -2
View File
@@ -9,11 +9,11 @@ Rectangle {
property int size: 80
property color backgroundColor: Theme.surfaceVariant
property color progressColor: Theme.accentPrimary
property int strokeWidth: 6
property int strokeWidth: 6 * Theme.uiScale
property bool showText: true
property string units: "%"
property string text: Math.round(progress * 100) + units
property int textSize: 10
property int textSize: 10 * Theme.uiScale
property color textColor: Theme.textPrimary
// Notch properties
+4 -4
View File
@@ -4,11 +4,11 @@ import qs.Settings
Item {
id: root
property int innerRadius: 34
property int outerRadius: 48
property int innerRadius: 34 * Theme.uiScale
property int outerRadius: 48 * Theme.uiScale
property color fillColor: "#fff"
property color strokeColor: "#fff"
property int strokeWidth: 0
property int strokeWidth: 0 * Theme.uiScale
property var values: []
property int usableOuter: 48
@@ -24,7 +24,7 @@ Item {
Rectangle {
property real value: root.values[index]
property real angle: (index / root.values.length) * 360
width: Math.max(2, (root.innerRadius * 2 * Math.PI) / root.values.length - 4)
width: Math.max(2 * Theme.uiScale, (root.innerRadius * 2 * Math.PI) / root.values.length - 4 * Theme.uiScale)
height: Settings.settings.visualizerType === "diamond" ? value * 2 * (usableOuter - root.innerRadius) : value * (usableOuter - root.innerRadius)
radius: width / 2
color: root.fillColor
+3 -3
View File
@@ -6,11 +6,11 @@ Shape {
id: root
property string position: "topleft" // Corner position: topleft/topright/bottomleft/bottomright
property real size: 1.0 // Scale multiplier for entire corner
property real size: 1.0 * Theme.uiScale // Scale multiplier for entire corner
property int concaveWidth: 100 * size
property int concaveHeight: 60 * size
property int offsetX: -20
property int offsetY: -20
property int offsetX: -20 * Theme.uiScale
property int offsetY: -20 * Theme.uiScale
property color fillColor: Theme.accentPrimary
property int arcRadius: 20 * size
+2 -2
View File
@@ -19,7 +19,7 @@ MouseArea {
Rectangle {
anchors.fill: parent
radius: 8
radius: 8 * Theme.uiScale
color: root.hovering ? Theme.accentPrimary : "transparent"
}
Text {
@@ -27,7 +27,7 @@ MouseArea {
anchors.centerIn: parent
text: root.icon
font.family: "Material Symbols Outlined"
font.pixelSize: 24
font.pixelSize: 24 * Theme.uiScale
color: root.hovering ? Theme.onAccent : Theme.textPrimary
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+4 -4
View File
@@ -13,8 +13,8 @@ Item {
property color iconCircleColor: Theme.accentPrimary
property color iconTextColor: Theme.backgroundPrimary
property color collapsedIconColor: Theme.textPrimary
property int pillHeight: 22
property int iconSize: 22
property int pillHeight: 22 * Theme.uiScale
property int iconSize: 22 * Theme.uiScale
property int pillPaddingHorizontal: 14
property bool autoHide: false
@@ -47,7 +47,7 @@ Item {
id: textItem
anchors.centerIn: parent
text: revealPill.text
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeSmall * Theme.uiScale
font.family: Theme.fontFamily
font.weight: Font.Bold
color: textColor
@@ -89,7 +89,7 @@ Item {
Text {
anchors.centerIn: parent
font.family: showPill ? "Material Symbols Rounded" : "Material Symbols Outlined"
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeSmall * Theme.uiScale
text: revealPill.icon
color: showPill ? iconTextColor : collapsedIconColor
}
+2 -1
View File
@@ -1,4 +1,5 @@
import QtQuick
import qs.Settings
Item {
id: root
@@ -6,7 +7,7 @@ Item {
property bool running: false
property color color: "white"
property int size: 16
property int strokeWidth: 2
property int strokeWidth: 2 * Theme.uiScale
property int duration: 1000
implicitWidth: size
+7 -7
View File
@@ -33,8 +33,8 @@ Window {
}
function _showNow() {
width = Math.max(50, tooltipText.implicitWidth + 24)
height = Math.max(50, tooltipText.implicitHeight + 16)
width = Math.max(50 * Theme.uiScale, tooltipText.implicitWidth + 24 * Theme.uiScale)
height = Math.max(50 * Theme.uiScale, tooltipText.implicitHeight + 16 * Theme.uiScale)
if (!targetItem) return;
@@ -75,10 +75,10 @@ Window {
Rectangle {
anchors.fill: parent
radius: 20
radius: 20 * Theme.uiScale
color: Theme.backgroundTertiary || "#222"
border.color: Theme.outline || "#444"
border.width: 1
border.width: 1 * Theme.uiScale
opacity: 0.97
z: 1
}
@@ -88,7 +88,7 @@ Window {
text: tooltipWindow.text
color: Theme.textPrimary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeSmall * Theme.uiScale
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@@ -105,7 +105,7 @@ Window {
}
onTextChanged: {
width = Math.max(minimumWidth, tooltipText.implicitWidth + 24);
height = Math.max(minimumHeight, tooltipText.implicitHeight + 16);
width = Math.max(minimumWidth * Theme.uiScale, tooltipText.implicitWidth + 24 * Theme.uiScale);
height = Math.max(minimumHeight * Theme.uiScale, tooltipText.implicitHeight + 16 * Theme.uiScale);
}
}
+7 -7
View File
@@ -17,8 +17,8 @@ Item {
model: root.tabsModel
delegate: Rectangle {
id: tabWrapper
implicitHeight: tab.height
implicitWidth: 56
implicitHeight: tab.height * Theme.uiScale
implicitWidth: 56 * Theme.uiScale
color: "transparent"
property bool hovered: false
@@ -48,7 +48,7 @@ Item {
Text {
text: modelData.icon
font.family: "Material Symbols Outlined"
font.pixelSize: 22
font.pixelSize: 22 * Theme.uiScale
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : tabWrapper.hovered ? (Theme ? Theme.accentPrimary : "#7C3AED") : (Theme ? Theme.textSecondary : "#444")
Layout.alignment: Qt.AlignCenter
}
@@ -56,7 +56,7 @@ Item {
// Label
Text {
text: modelData.label
font.pixelSize: 12
font.pixelSize: 12 * Theme.uiScale
font.bold: index === root.currentIndex
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : tabWrapper.hovered ? (Theme ? Theme.accentPrimary : "#7C3AED") : (Theme ? Theme.textSecondary : "#444")
Layout.alignment: Qt.AlignCenter
@@ -64,9 +64,9 @@ Item {
// Underline for active tab
Rectangle {
width: 24
height: 2
radius: 1
width: 24 * Theme.uiScale
height: 2 * Theme.uiScale
radius: 1 * Theme.uiScale
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : "transparent"
Layout.alignment: Qt.AlignCenter
}