diff --git a/Bar/Bar.qml b/Bar/Bar.qml index b542def..48c18cb 100644 --- a/Bar/Bar.qml +++ b/Bar/Bar.qml @@ -48,7 +48,7 @@ Scope { id: barBackground width: parent.width - height: 36 * Theme.uiScale + height: 36 * Theme.scale(Screen) color: Theme.backgroundPrimary anchors.top: parent.top anchors.left: parent.left @@ -59,8 +59,8 @@ Scope { anchors.verticalCenter: barBackground.verticalCenter anchors.left: barBackground.left - anchors.leftMargin: 18 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.leftMargin: 18 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) SystemInfo { anchors.verticalCenter: parent.verticalCenter @@ -93,8 +93,8 @@ Scope { anchors.verticalCenter: barBackground.verticalCenter anchors.right: barBackground.right - anchors.rightMargin: 18 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.rightMargin: 18 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) SystemTray { id: systemTrayModule diff --git a/Bar/Modules/ActiveWindow.qml b/Bar/Modules/ActiveWindow.qml index 206de29..fca39d5 100644 --- a/Bar/Modules/ActiveWindow.qml +++ b/Bar/Modules/ActiveWindow.qml @@ -17,7 +17,7 @@ PanelWindow { visible: Settings.settings.showActiveWindow && !activeWindowWrapper.finallyHidden implicitHeight: activeWindowTitleContainer.height implicitWidth: 0 - property int barHeight: 36 * Theme.uiScale + property int barHeight: 36 * Theme.scale(Screen) color: "transparent" function getIcon() { @@ -127,7 +127,7 @@ PanelWindow { Text { id: activeWindowTitle text: ToplevelManager?.activeToplevel?.title && ToplevelManager?.activeToplevel?.title.length > 60 ? ToplevelManager?.activeToplevel?.title.substring(0, 60) + "..." : ToplevelManager?.activeToplevel?.title || "" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary anchors.left: icon.right anchors.leftMargin: Settings.settings.showActiveWindowIcon ? 4 : 6 diff --git a/Bar/Modules/Applauncher.qml b/Bar/Modules/Applauncher.qml index d62e300..174364b 100644 --- a/Bar/Modules/Applauncher.qml +++ b/Bar/Modules/Applauncher.qml @@ -532,7 +532,7 @@ PanelWithOverlay { Text { text: "search" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeHeader * Theme.uiScale + font.pixelSize: Theme.fontSizeHeader * Theme.scale(Screen) color: searchField.activeFocus ? Theme.accentPrimary : Theme.textSecondary verticalAlignment: Text.AlignVCenter Layout.alignment: Qt.AlignVCenter @@ -545,7 +545,7 @@ PanelWithOverlay { placeholderTextColor: Theme.textSecondary background: null font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter onTextChanged: root.updateFilter() @@ -689,7 +689,7 @@ PanelWithOverlay { visible: !modelData.isCalculator && !modelData.isClipboard && !modelData.isCommand && !parent.iconLoaded && modelData.type !== 'image' text: "broken_image" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeHeader * Theme.uiScale + font.pixelSize: Theme.fontSizeHeader * Theme.scale(Screen) color: Theme.accentPrimary } } @@ -702,7 +702,7 @@ PanelWithOverlay { text: modelData.name color: (hovered || isSelected) ? Theme.onAccent : (appLauncherPanel.isPinned(modelData) ? Theme.textPrimary : Theme.textPrimary) font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) font.bold: hovered || isSelected verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -716,7 +716,7 @@ PanelWithOverlay { (modelData.comment || modelData.genericName || "No description available") color: (hovered || isSelected) ? Theme.onAccent : (appLauncherPanel.isPinned(modelData) ? Theme.textSecondary : Theme.textSecondary) font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeCaption * Theme.uiScale + font.pixelSize: Theme.fontSizeCaption * Theme.scale(Screen) font.italic: !(modelData.comment || modelData.genericName) opacity: modelData.isClipboard ? 0.8 : modelData.isCommand ? 0.9 : ((modelData.comment || modelData.genericName) ? 1.0 : 0.6) elide: Text.ElideRight @@ -734,7 +734,7 @@ PanelWithOverlay { Text { text: modelData.isCalculator ? "content_copy" : "chevron_right" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) color: (hovered || isSelected) ? Theme.onAccent : (appLauncherPanel.isPinned(modelData) ? Theme.textPrimary : Theme.textSecondary) @@ -818,7 +818,7 @@ PanelWithOverlay { anchors.centerIn: parent text: "star" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) color: (parent.MouseArea.containsMouse || hovered || isSelected) ? Theme.onAccent : (appLauncherPanel.isPinned(modelData) ? Theme.textPrimary : Theme.textDisabled) diff --git a/Bar/Modules/AudioDeviceSelector.qml b/Bar/Modules/AudioDeviceSelector.qml index 590a82c..3d45d92 100644 --- a/Bar/Modules/AudioDeviceSelector.qml +++ b/Bar/Modules/AudioDeviceSelector.qml @@ -155,7 +155,7 @@ PanelWithOverlay { Text { text: "volume_up" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: (Pipewire.defaultAudioSink && Pipewire.defaultAudioSink.id === modelData.id) ? Theme.accentPrimary : Theme.textPrimary Layout.alignment: Qt.AlignVCenter } @@ -168,7 +168,7 @@ PanelWithOverlay { Text { text: modelData.nickname || modelData.description || modelData.name font.bold: true - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: (Pipewire.defaultAudioSink && Pipewire.defaultAudioSink.id === modelData.id) ? Theme.accentPrimary : Theme.textPrimary elide: Text.ElideRight maximumLineCount: 1 @@ -177,7 +177,7 @@ PanelWithOverlay { Text { text: modelData.description !== modelData.nickname ? modelData.description : "" - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) color: Theme.textSecondary elide: Text.ElideRight maximumLineCount: 1 @@ -200,7 +200,7 @@ PanelWithOverlay { anchors.centerIn: parent text: "Set" color: Theme.onAccent - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) font.bold: true } @@ -216,7 +216,7 @@ PanelWithOverlay { text: "(Current)" visible: Pipewire.defaultAudioSink && Pipewire.defaultAudioSink.id === modelData.id color: Theme.accentPrimary - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter } @@ -267,7 +267,7 @@ PanelWithOverlay { Text { text: "mic" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: (Pipewire.defaultAudioSource && Pipewire.defaultAudioSource.id === modelData.id) ? Theme.accentPrimary : Theme.textPrimary Layout.alignment: Qt.AlignVCenter } @@ -280,7 +280,7 @@ PanelWithOverlay { Text { text: modelData.nickname || modelData.description || modelData.name font.bold: true - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: (Pipewire.defaultAudioSource && Pipewire.defaultAudioSource.id === modelData.id) ? Theme.accentPrimary : Theme.textPrimary elide: Text.ElideRight maximumLineCount: 1 @@ -289,7 +289,7 @@ PanelWithOverlay { Text { text: modelData.description !== modelData.nickname ? modelData.description : "" - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) color: Theme.textSecondary elide: Text.ElideRight maximumLineCount: 1 @@ -312,7 +312,7 @@ PanelWithOverlay { anchors.centerIn: parent text: "Set" color: Theme.onAccent - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) font.bold: true } @@ -328,7 +328,7 @@ PanelWithOverlay { text: "(Current)" visible: Pipewire.defaultAudioSource && Pipewire.defaultAudioSource.id === modelData.id color: Theme.accentPrimary - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter } diff --git a/Bar/Modules/Bluetooth.qml b/Bar/Modules/Bluetooth.qml index fda61ec..0c080dc 100644 --- a/Bar/Modules/Bluetooth.qml +++ b/Bar/Modules/Bluetooth.qml @@ -45,7 +45,7 @@ Item { } } font.family: mouseAreaBluetooth.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: mouseAreaBluetooth.containsMouse ? Theme.accentPrimary : Theme.textPrimary } @@ -125,13 +125,13 @@ Item { Text { text: "bluetooth" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.accentPrimary } Text { text: "Bluetooth Devices" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary Layout.fillWidth: true @@ -180,7 +180,7 @@ Item { Text { text: modelData.connected ? "bluetooth" : "bluetooth_disabled" font.family: "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: deviceMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textSecondary) } @@ -199,7 +199,7 @@ Item { return deviceName; } color: deviceMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textPrimary) - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -217,7 +217,7 @@ Item { } } color: deviceMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textSecondary) - font.pixelSize: 11 * Theme.uiScale + font.pixelSize: 11 * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -265,7 +265,7 @@ Item { Text { text: "Scanning for devices..." - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary } diff --git a/Bar/Modules/Calendar.qml b/Bar/Modules/Calendar.qml index baf7f9f..47757fa 100644 --- a/Bar/Modules/Calendar.qml +++ b/Bar/Modules/Calendar.qml @@ -52,7 +52,7 @@ PanelWithOverlay { text: calendar.title color: Theme.textPrimary opacity: 0.7 - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.family: Theme.fontFamily font.bold: true } @@ -78,7 +78,7 @@ PanelWithOverlay { text: shortName color: Theme.textPrimary opacity: 0.8 - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.family: Theme.fontFamily font.bold: true horizontalAlignment: Text.AlignHCenter @@ -161,7 +161,7 @@ PanelWithOverlay { text: model.day color: model.today ? Theme.onAccent : Theme.textPrimary opacity: model.month === calendar.month ? (mouseArea2.containsMouse ? 1 : 0.7) : 0.3 - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.family: Theme.fontFamily font.bold: model.today ? true : false } diff --git a/Bar/Modules/ClockWidget.qml b/Bar/Modules/ClockWidget.qml index a539f45..bff0d35 100644 --- a/Bar/Modules/ClockWidget.qml +++ b/Bar/Modules/ClockWidget.qml @@ -15,7 +15,7 @@ Rectangle { text: Time.time font.family: Theme.fontFamily font.weight: Font.Bold - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) color: Theme.textPrimary anchors.centerIn: parent } diff --git a/Bar/Modules/CustomTrayMenu.qml b/Bar/Modules/CustomTrayMenu.qml index 9a994e3..e575648 100644 --- a/Bar/Modules/CustomTrayMenu.qml +++ b/Bar/Modules/CustomTrayMenu.qml @@ -128,7 +128,7 @@ PopupWindow { color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Theme.textDisabled; text: modelData?.text ?? ""; font.family: Theme.fontFamily; - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale; + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen); verticalAlignment: Text.AlignVCenter; elide: Text.ElideRight; } @@ -145,7 +145,7 @@ PopupWindow { // Material Symbols Outlined chevron right for submenu text: modelData?.hasChildren ? "menu" : ""; font.family: "Material Symbols Outlined"; - font.pixelSize: 18 * Theme.uiScale; + font.pixelSize: 18 * Theme.scale(Screen); verticalAlignment: Text.AlignVCenter; visible: modelData?.hasChildren ?? false; color: Theme.textPrimary; @@ -362,7 +362,7 @@ PopupWindow { color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Theme.textDisabled; text: modelData?.text ?? ""; font.family: Theme.fontFamily; - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale; + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen); verticalAlignment: Text.AlignVCenter; elide: Text.ElideRight; } @@ -378,7 +378,7 @@ PopupWindow { Text { text: modelData?.hasChildren ? "\uE5CC" : ""; font.family: "Material Symbols Outlined"; - font.pixelSize: 18 * Theme.uiScale; + font.pixelSize: 18 * Theme.scale(Screen); verticalAlignment: Text.AlignVCenter; visible: modelData?.hasChildren ?? false; color: Theme.textPrimary; diff --git a/Bar/Modules/Media.qml b/Bar/Modules/Media.qml index 1aa46ab..d9da9f3 100644 --- a/Bar/Modules/Media.qml +++ b/Bar/Modules/Media.qml @@ -10,7 +10,7 @@ import qs.Components Item { id: mediaControl width: visible ? mediaRow.width : 0 - height: 36 * Theme.uiScale + height: 36 * Theme.scale(Screen) visible: Settings.settings.showMediaInBar && MusicManager.currentPlayer RowLayout { @@ -20,8 +20,8 @@ Item { Item { id: albumArtContainer - width: 24 * Theme.uiScale - height: 24 * Theme.uiScale + width: 24 * Theme.scale(Screen) + height: 24 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter // Circular spectrum visualizer @@ -29,8 +29,8 @@ Item { id: spectrum values: MusicManager.cavaValues anchors.centerIn: parent - innerRadius: 10 * Theme.uiScale - outerRadius: 18 * Theme.uiScale + innerRadius: 10 * Theme.scale(Screen) + outerRadius: 18 * Theme.scale(Screen) fillColor: Theme.accentPrimary strokeColor: Theme.accentPrimary strokeWidth: 0 @@ -40,10 +40,10 @@ Item { // Album art image Rectangle { id: albumArtwork - width: 20 * Theme.uiScale - height: 20 * Theme.uiScale + width: 20 * Theme.scale(Screen) + height: 20 * Theme.scale(Screen) anchors.centerIn: parent - radius: 12 * Theme.uiScale // circle + radius: 12 * Theme.scale(Screen) // circle color: Qt.darker(Theme.surface, 1.1) border.color: Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.3) border.width: 1 @@ -79,7 +79,7 @@ Item { anchors.centerIn: parent text: "music_note" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.4) visible: !albumArt.visible } @@ -96,7 +96,7 @@ Item { anchors.centerIn: parent text: MusicManager.isPlaying ? "pause" : "play_arrow" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: "white" } } @@ -117,7 +117,7 @@ Item { text: MusicManager.trackTitle + " - " + MusicManager.trackArtist color: Theme.textPrimary font.family: Theme.fontFamily - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) elide: Text.ElideRight Layout.maximumWidth: 300 Layout.alignment: Qt.AlignVCenter diff --git a/Bar/Modules/SettingsButton.qml b/Bar/Modules/SettingsButton.qml index 97f46c5..c832bd8 100644 --- a/Bar/Modules/SettingsButton.qml +++ b/Bar/Modules/SettingsButton.qml @@ -21,7 +21,7 @@ Item { anchors.centerIn: parent text: "settings" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: mouseArea.containsMouse ? Theme.accentPrimary : Theme.textPrimary } diff --git a/Bar/Modules/SystemInfo.qml b/Bar/Modules/SystemInfo.qml index 3361f94..bc87c29 100644 --- a/Bar/Modules/SystemInfo.qml +++ b/Bar/Modules/SystemInfo.qml @@ -17,7 +17,7 @@ Row { Text { id: cpuUsageIcon font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) text: "speed" verticalAlignment: Text.AlignVCenter anchors.verticalCenter: parent.verticalCenter @@ -27,7 +27,7 @@ Row { Text { id: cpuUsageText font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) color: Theme.textPrimary text: Sysinfo.cpuUsageStr anchors.verticalCenter: parent.verticalCenter @@ -41,7 +41,7 @@ Row { spacing: 3 Text { font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) text: "thermometer" verticalAlignment: Text.AlignVCenter anchors.verticalCenter: parent.verticalCenter @@ -50,7 +50,7 @@ Row { Text { font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) color: Theme.textPrimary text: Sysinfo.cpuTempStr anchors.verticalCenter: parent.verticalCenter @@ -64,7 +64,7 @@ Row { spacing: 3 Text { font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) text: "memory" color: Theme.accentPrimary verticalAlignment: Text.AlignVCenter @@ -73,7 +73,7 @@ Row { Text { font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) color: Theme.textPrimary text: Sysinfo.memoryUsageStr anchors.verticalCenter: parent.verticalCenter diff --git a/Bar/Modules/SystemTray.qml b/Bar/Modules/SystemTray.qml index 177871d..da6e04c 100644 --- a/Bar/Modules/SystemTray.qml +++ b/Bar/Modules/SystemTray.qml @@ -21,8 +21,8 @@ Row { Repeater { model: systemTray.items delegate: Item { - width: 24 * Theme.uiScale - height: 24 * Theme.uiScale + width: 24 * Theme.scale(Screen) + height: 24 * Theme.scale(Screen) visible: modelData property bool isHovered: trayMouseArea.containsMouse @@ -31,17 +31,17 @@ Row { Rectangle { anchors.centerIn: parent - width: 16 * Theme.uiScale - height: 16 * Theme.uiScale - radius: 6 * Theme.uiScale + width: 16 * Theme.scale(Screen) + height: 16 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: "transparent" clip: true IconImage { id: trayIcon anchors.centerIn: parent - width: 16 * Theme.uiScale - height: 16 * Theme.uiScale + width: 16 * Theme.scale(Screen) + height: 16 * Theme.scale(Screen) smooth: false asynchronous: true backer.fillMode: Image.PreserveAspectFit @@ -99,7 +99,7 @@ Row { if (modelData.hasMenu && modelData.menu && trayMenu) { // Anchor the menu to the tray icon item (parent) and position it below the icon const menuX = (width / 2) - (trayMenu.width / 2); - const menuY = height + 20 * Theme.uiScale; + const menuY = height + 20 * Theme.scale(Screen); trayMenu.menu = modelData.menu; trayMenu.showAt(parent, menuX, menuY); } else diff --git a/Bar/Modules/Taskbar.qml b/Bar/Modules/Taskbar.qml index 1440d51..249f4c0 100644 --- a/Bar/Modules/Taskbar.qml +++ b/Bar/Modules/Taskbar.qml @@ -83,7 +83,7 @@ Item { visible: !appIcon.visible text: appButton.appId ? appButton.appId.charAt(0).toUpperCase() : "?" font.family: Theme.fontFamily - font.pixelSize: Math.max(10, Settings.settings.taskbarIconSize * 0.4375 * Theme.uiScale) + font.pixelSize: Math.max(10, Settings.settings.taskbarIconSize * 0.4375 * Theme.scale(Screen)) font.bold: true color: appButton.isActive ? Theme.onAccent : Theme.textPrimary } diff --git a/Bar/Modules/Wifi.qml b/Bar/Modules/Wifi.qml index cae7100..b2c783e 100644 --- a/Bar/Modules/Wifi.qml +++ b/Bar/Modules/Wifi.qml @@ -51,7 +51,7 @@ Item { return connected ? network.signalIcon(parent.currentSignal) : "wifi_off" } font.family: mouseAreaWifi.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: mouseAreaWifi.containsMouse ? Theme.accentPrimary : Theme.textPrimary } @@ -120,13 +120,13 @@ Item { Text { text: "wifi" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.accentPrimary } Text { text: "WiFi Networks" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary Layout.fillWidth: true @@ -183,7 +183,7 @@ Item { Text { text: network.signalIcon(modelData.signal) font.family: "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: networkMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textSecondary) } @@ -194,7 +194,7 @@ Item { Text { text: modelData.ssid || "Unknown Network" color: networkMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textPrimary) - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -202,7 +202,7 @@ Item { Text { text: modelData.security && modelData.security !== "--" ? modelData.security : "Open" color: networkMouseArea.containsMouse ? Theme.backgroundPrimary : (modelData.connected ? Theme.accentPrimary : Theme.textSecondary) - font.pixelSize: 11 * Theme.uiScale + font.pixelSize: 11 * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -211,7 +211,7 @@ Item { visible: network.connectStatusSsid === modelData.ssid && network.connectStatus === "error" && network.connectError.length > 0 text: network.connectError color: Theme.error - font.pixelSize: 11 * Theme.uiScale + font.pixelSize: 11 * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -234,7 +234,7 @@ Item { visible: network.connectStatus === "success" && !network.connectingSsid text: "check_circle" font.family: "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: "#43a047" anchors.centerIn: parent } @@ -243,7 +243,7 @@ Item { visible: network.connectStatus === "error" && !network.connectingSsid text: "error" font.family: "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: Theme.error anchors.centerIn: parent } @@ -253,7 +253,7 @@ Item { visible: modelData.connected text: "connected" color: networkMouseArea.containsMouse ? Theme.backgroundPrimary : Theme.accentPrimary - font.pixelSize: 11 * Theme.uiScale + font.pixelSize: 11 * Theme.scale(Screen) } } @@ -309,7 +309,7 @@ Item { anchors.fill: parent anchors.margins: 12 text: passwordInput - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: TextInput.AlignVCenter clip: true @@ -364,7 +364,7 @@ Item { anchors.centerIn: parent text: "Connect" color: Theme.backgroundPrimary - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) font.bold: true } } diff --git a/Bar/Modules/Workspace.qml b/Bar/Modules/Workspace.qml index b9825b6..6198985 100644 --- a/Bar/Modules/Workspace.qml +++ b/Bar/Modules/Workspace.qml @@ -40,7 +40,7 @@ Item { return total; } - height: 36 * Theme.uiScale + height: 36 * Theme.scale(Screen) Component.onCompleted: { localWorkspaces.clear(); @@ -115,14 +115,14 @@ Item { Rectangle { id: workspaceBackground - width: parent.width - 15 * Theme.uiScale - height: 26 * Theme.uiScale + width: parent.width - 15 * Theme.scale(Screen) + height: 26 * Theme.scale(Screen) anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - radius: 12 * Theme.uiScale + radius: 12 * Theme.scale(Screen) color: Theme.surfaceVariant border.color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.1) - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) layer.enabled: true layer.effect: MultiEffect { shadowColor: "black" @@ -145,7 +145,7 @@ Item { model: localWorkspaces Item { id: workspacePillContainer - height: 12 * Theme.uiScale + height: 12 * Theme.scale(Screen) width: { if (model.isFocused) return 44; @@ -245,12 +245,12 @@ Item { Rectangle { id: pillBurst anchors.centerIn: workspacePillContainer - width: workspacePillContainer.width + 18 * root.masterProgress * Theme.uiScale - height: workspacePillContainer.height + 18 * root.masterProgress * Theme.uiScale + width: workspacePillContainer.width + 18 * root.masterProgress * Theme.scale(Screen) + height: workspacePillContainer.height + 18 * root.masterProgress * Theme.scale(Screen) radius: width / 2 color: "transparent" border.color: root.effectColor - border.width: (2 + 6 * (1.0 - root.masterProgress)) * Theme.uiScale + border.width: (2 + 6 * (1.0 - root.masterProgress)) * Theme.scale(Screen) opacity: root.effectsActive && model.isFocused ? (1.0 - root.masterProgress) * 0.7 : 0 visible: root.effectsActive && model.isFocused z: 1 diff --git a/Components/Avatar.qml b/Components/Avatar.qml index b2788aa..b2c29a2 100644 --- a/Components/Avatar.qml +++ b/Components/Avatar.qml @@ -43,7 +43,7 @@ Item { anchors.centerIn: parent text: "person" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.onAccent visible: Settings.settings.profileImage === undefined || Settings.settings.profileImage === "" z: 0 diff --git a/Components/CircularProgressBar.qml b/Components/CircularProgressBar.qml index 61ef17f..a38bb1b 100644 --- a/Components/CircularProgressBar.qml +++ b/Components/CircularProgressBar.qml @@ -9,11 +9,11 @@ Rectangle { property int size: 80 property color backgroundColor: Theme.surfaceVariant property color progressColor: Theme.accentPrimary - property int strokeWidth: 6 * Theme.uiScale + property int strokeWidth: 6 * Theme.scale(Screen) property bool showText: true property string units: "%" property string text: Math.round(progress * 100) + units - property int textSize: 10 * Theme.uiScale + property int textSize: 10 * Theme.scale(Screen) property color textColor: Theme.textPrimary // Notch properties diff --git a/Components/CircularSpectrum.qml b/Components/CircularSpectrum.qml index 635f550..7931fd4 100644 --- a/Components/CircularSpectrum.qml +++ b/Components/CircularSpectrum.qml @@ -4,11 +4,11 @@ import qs.Settings Item { id: root - property int innerRadius: 34 * Theme.uiScale - property int outerRadius: 48 * Theme.uiScale + property int innerRadius: 34 * Theme.scale(Screen) + property int outerRadius: 48 * Theme.scale(Screen) property color fillColor: "#fff" property color strokeColor: "#fff" - property int strokeWidth: 0 * Theme.uiScale + property int strokeWidth: 0 * Theme.scale(Screen) 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 * Theme.uiScale, (root.innerRadius * 2 * Math.PI) / root.values.length - 4 * Theme.uiScale) + width: Math.max(2 * Theme.scale(Screen), (root.innerRadius * 2 * Math.PI) / root.values.length - 4 * Theme.scale(Screen)) height: Settings.settings.visualizerType === "diamond" ? value * 2 * (usableOuter - root.innerRadius) : value * (usableOuter - root.innerRadius) radius: width / 2 color: root.fillColor diff --git a/Components/Corners.qml b/Components/Corners.qml index c8ac17e..716b30c 100644 --- a/Components/Corners.qml +++ b/Components/Corners.qml @@ -6,11 +6,11 @@ Shape { id: root property string position: "topleft" // Corner position: topleft/topright/bottomleft/bottomright - property real size: 1.0 * Theme.uiScale // Scale multiplier for entire corner + property real size: 1.0 * Theme.scale(Screen) // Scale multiplier for entire corner property int concaveWidth: 100 * size property int concaveHeight: 60 * size - property int offsetX: -20 * Theme.uiScale - property int offsetY: -20 * Theme.uiScale + property int offsetX: -20 * Theme.scale(Screen) + property int offsetY: -20 * Theme.scale(Screen) property color fillColor: Theme.accentPrimary property int arcRadius: 20 * size diff --git a/Components/IconButton.qml b/Components/IconButton.qml index 6dc4b1a..93d623d 100644 --- a/Components/IconButton.qml +++ b/Components/IconButton.qml @@ -19,7 +19,7 @@ MouseArea { Rectangle { anchors.fill: parent - radius: 8 * Theme.uiScale + radius: 8 * Theme.scale(Screen) 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 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: root.hovering ? Theme.onAccent : Theme.textPrimary horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/Components/PillIndicator.qml b/Components/PillIndicator.qml index addf5ec..2e6d307 100644 --- a/Components/PillIndicator.qml +++ b/Components/PillIndicator.qml @@ -13,8 +13,8 @@ Item { property color iconCircleColor: Theme.accentPrimary property color iconTextColor: Theme.backgroundPrimary property color collapsedIconColor: Theme.textPrimary - property int pillHeight: 22 * Theme.uiScale - property int iconSize: 22 * Theme.uiScale + property int pillHeight: 22 * Theme.scale(Screen) + property int iconSize: 22 * Theme.scale(Screen) 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 * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) 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 * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) text: revealPill.icon color: showPill ? iconTextColor : collapsedIconColor } diff --git a/Components/Spinner.qml b/Components/Spinner.qml index c902e17..73c8104 100644 --- a/Components/Spinner.qml +++ b/Components/Spinner.qml @@ -7,7 +7,7 @@ Item { property bool running: false property color color: "white" property int size: 16 - property int strokeWidth: 2 * Theme.uiScale + property int strokeWidth: 2 * Theme.scale(Screen) property int duration: 1000 implicitWidth: size diff --git a/Components/StyledTooltip.qml b/Components/StyledTooltip.qml index 90b6948..ecf7ffd 100644 --- a/Components/StyledTooltip.qml +++ b/Components/StyledTooltip.qml @@ -33,8 +33,8 @@ Window { } function _showNow() { - width = Math.max(50 * Theme.uiScale, tooltipText.implicitWidth + 24 * Theme.uiScale) - height = Math.max(50 * Theme.uiScale, tooltipText.implicitHeight + 16 * Theme.uiScale) + width = Math.max(50 * Theme.scale(Screen), tooltipText.implicitWidth + 24 * Theme.scale(Screen)) + height = Math.max(50 * Theme.scale(Screen), tooltipText.implicitHeight + 16 * Theme.scale(Screen)) if (!targetItem) return; @@ -75,10 +75,10 @@ Window { Rectangle { anchors.fill: parent - radius: 20 * Theme.uiScale + radius: 20 * Theme.scale(Screen) color: Theme.backgroundTertiary || "#222" border.color: Theme.outline || "#444" - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) opacity: 0.97 z: 1 } @@ -88,7 +88,7 @@ Window { text: tooltipWindow.text color: Theme.textPrimary font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) anchors.centerIn: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -105,7 +105,7 @@ Window { } onTextChanged: { - width = Math.max(minimumWidth * Theme.uiScale, tooltipText.implicitWidth + 24 * Theme.uiScale); - height = Math.max(minimumHeight * Theme.uiScale, tooltipText.implicitHeight + 16 * Theme.uiScale); + width = Math.max(minimumWidth * Theme.scale(Screen), tooltipText.implicitWidth + 24 * Theme.scale(Screen)); + height = Math.max(minimumHeight * Theme.scale(Screen), tooltipText.implicitHeight + 16 * Theme.scale(Screen)); } } \ No newline at end of file diff --git a/Components/Tabs.qml b/Components/Tabs.qml index 319d2fe..0f7f74a 100644 --- a/Components/Tabs.qml +++ b/Components/Tabs.qml @@ -17,8 +17,8 @@ Item { model: root.tabsModel delegate: Rectangle { id: tabWrapper - implicitHeight: tab.height * Theme.uiScale - implicitWidth: 56 * Theme.uiScale + implicitHeight: tab.height * Theme.scale(Screen) + implicitWidth: 56 * Theme.scale(Screen) color: "transparent" property bool hovered: false @@ -48,7 +48,7 @@ Item { Text { text: modelData.icon font.family: "Material Symbols Outlined" - font.pixelSize: 22 * Theme.uiScale + font.pixelSize: 22 * Theme.scale(Screen) 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 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) 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 * Theme.uiScale - height: 2 * Theme.uiScale - radius: 1 * Theme.uiScale + width: 24 * Theme.scale(Screen) + height: 2 * Theme.scale(Screen) + radius: 1 * Theme.scale(Screen) color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : "transparent" Layout.alignment: Qt.AlignCenter } diff --git a/Components/ToggleOption.qml b/Components/ToggleOption.qml index d2d0ce8..e99c727 100644 --- a/Components/ToggleOption.qml +++ b/Components/ToggleOption.qml @@ -19,19 +19,19 @@ ColumnLayout { Layout.fillWidth: true ColumnLayout { - spacing: 4 * Theme.uiScale + spacing: 4 * Theme.scale(Screen) Layout.fillWidth: true Text { text: label - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: description - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true @@ -42,20 +42,20 @@ ColumnLayout { Rectangle { id: switcher - width: 52 * Theme.uiScale - height: 32 * Theme.uiScale - radius: 16 * Theme.uiScale + width: 52 * Theme.scale(Screen) + height: 32 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: value ? Theme.accentPrimary : Theme.surfaceVariant border.color: value ? Theme.accentPrimary : Theme.outline - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) Rectangle { - width: 28 * Theme.uiScale - height: 28 * Theme.uiScale - radius: 14 * Theme.uiScale + width: 28 * Theme.scale(Screen) + height: 28 * Theme.scale(Screen) + radius: 14 * Theme.scale(Screen) color: Theme.surface border.color: Theme.outline - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) y: 2 x: value ? switcher.width - width - 2 : 2 @@ -82,7 +82,7 @@ ColumnLayout { } Rectangle { - height: 8 * Theme.uiScale + height: 8 * Theme.scale(Screen) } } diff --git a/Settings/Theme.qml b/Settings/Theme.qml index 531018c..2ffe87d 100644 --- a/Settings/Theme.qml +++ b/Settings/Theme.qml @@ -15,10 +15,9 @@ Singleton { readonly property real scalingDampening: 0.2 // Automatic scaling based on screen width - function screenWidthRatio() { - // Get the primary screen width - if (Quickshell.screens && Quickshell.screens.length > 0) { - var rawRatio = Quickshell.screens[0].width / designScreenWidth + function scale(currentScreen) { + if (currentScreen !== undefined) { + var rawRatio = currentScreen.width / designScreenWidth // Apply dampening to reduce scaling for higher resolutions return Math.min(2.0, 1.0 + (rawRatio - 1.0) * scalingDampening) } @@ -117,9 +116,6 @@ Singleton { property color shadow: applyOpacity(themeData.shadow, "B3") property color overlay: applyOpacity(themeData.overlay, "66") - // Global UI scale factor - automatically calculated based on screen width - property real uiScale: screenWidthRatio() - // Font Properties property string fontFamily: "Roboto" // Family for all text diff --git a/Widgets/Dock.qml b/Widgets/Dock.qml index c2375da..578a97a 100644 --- a/Widgets/Dock.qml +++ b/Widgets/Dock.qml @@ -302,7 +302,7 @@ PanelWindow { anchors.verticalCenter: parent.verticalCenter text: "close" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: Theme.textPrimary } @@ -310,7 +310,7 @@ PanelWindow { anchors.verticalCenter: parent.verticalCenter text: "Close" font.family: Theme.fontFamily - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: Theme.textPrimary } } diff --git a/Widgets/LockScreen/BatteryCharge.qml b/Widgets/LockScreen/BatteryCharge.qml index 93100ac..ad00d45 100644 --- a/Widgets/LockScreen/BatteryCharge.qml +++ b/Widgets/LockScreen/BatteryCharge.qml @@ -58,7 +58,7 @@ Item { Text { text: batteryIcon() font.family: "Material Symbols Outlined" - font.pixelSize: 28 * Theme.uiScale + font.pixelSize: 28 * Theme.scale(Screen) color: charging ? Theme.accentPrimary : Theme.textSecondary verticalAlignment: Text.AlignVBottom } @@ -66,7 +66,7 @@ Item { Text { text: Math.round(percent) + "%" font.family: Theme.fontFamily - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: Theme.textSecondary verticalAlignment: Text.AlignVBottom } diff --git a/Widgets/LockScreen/LockScreen.qml b/Widgets/LockScreen/LockScreen.qml index fde716e..b6ab0a7 100644 --- a/Widgets/LockScreen/LockScreen.qml +++ b/Widgets/LockScreen/LockScreen.qml @@ -152,21 +152,21 @@ WlSessionLock { ColumnLayout { anchors.centerIn: parent spacing: 30 - width: Math.min(parent.width * 0.8, 400 * Theme.uiScale) + width: Math.min(parent.width * 0.8, 400 * Theme.scale(Screen)) Rectangle { Layout.alignment: Qt.AlignHCenter - width: 80 * Theme.uiScale - height: 80 * Theme.uiScale - radius: 40 * Theme.uiScale + width: 80 * Theme.scale(Screen) + height: 80 * Theme.scale(Screen) + radius: 40 * Theme.scale(Screen) color: Theme.accentPrimary Rectangle { anchors.fill: parent color: "transparent" - radius: 40 * Theme.uiScale + radius: 40 * Theme.scale(Screen) border.color: Theme.accentPrimary - border.width: 3 * Theme.uiScale + border.width: 3 * Theme.scale(Screen) z: 2 } @@ -183,28 +183,28 @@ WlSessionLock { Layout.alignment: Qt.AlignHCenter text: Quickshell.env("USER") font.family: Theme.fontFamily - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) font.weight: Font.Medium color: Theme.textPrimary } Rectangle { Layout.fillWidth: true - height: 50 * Theme.uiScale - radius: 25 * Theme.uiScale + height: 50 * Theme.scale(Screen) + radius: 25 * Theme.scale(Screen) color: Theme.surface opacity: passwordInput.activeFocus ? 0.8 : 0.3 border.color: passwordInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) TextInput { id: passwordInput anchors.fill: parent - anchors.margins: 15 * Theme.uiScale + anchors.margins: 15 * Theme.scale(Screen) verticalAlignment: TextInput.AlignVCenter horizontalAlignment: TextInput.AlignHCenter font.family: Theme.fontFamily - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textPrimary echoMode: TextInput.Password passwordCharacter: "●" @@ -218,7 +218,7 @@ WlSessionLock { text: "Enter password..." color: Theme.textSecondary font.family: Theme.fontFamily - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) visible: !passwordInput.text && !passwordInput.activeFocus } @@ -238,9 +238,9 @@ WlSessionLock { id: errorMessageRect Layout.alignment: Qt.AlignHCenter width: parent.width * 0.8 - height: 44 * Theme.uiScale + height: 44 * Theme.scale(Screen) color: Theme.overlay - radius: 20 * Theme.uiScale + radius: 20 * Theme.scale(Screen) visible: lock.errorMessage !== "" Text { @@ -248,7 +248,7 @@ WlSessionLock { text: lock.errorMessage color: Theme.error font.family: Theme.fontFamily - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) opacity: 1 visible: lock.errorMessage !== "" } @@ -256,13 +256,13 @@ WlSessionLock { Rectangle { Layout.alignment: Qt.AlignHCenter - width: 120 * Theme.uiScale - height: 44 * Theme.uiScale - radius: 20 * Theme.uiScale + width: 120 * Theme.scale(Screen) + height: 44 * Theme.scale(Screen) + radius: 20 * Theme.scale(Screen) opacity: unlockButtonArea.containsMouse ? 0.8 : 0.5 color: unlockButtonArea.containsMouse ? Theme.accentPrimary : Theme.surface border.color: Theme.accentPrimary - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) enabled: !lock.authenticating Text { @@ -270,7 +270,7 @@ WlSessionLock { anchors.centerIn: parent text: lock.authenticating ? "..." : "Unlock" font.family: Theme.fontFamily - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) font.bold: true color: unlockButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary } @@ -324,12 +324,12 @@ WlSessionLock { } Rectangle { - width: infoColumn.width + 32 * Theme.uiScale - height: infoColumn.height + 8 * Theme.uiScale + width: infoColumn.width + 32 * Theme.scale(Screen) + height: infoColumn.height + 8 * Theme.scale(Screen) color: (Theme.backgroundPrimary !== undefined && Theme.backgroundPrimary !== null) ? Theme.backgroundPrimary : "#222" anchors.horizontalCenter: parent.horizontalCenter - bottomLeftRadius: 20 * Theme.uiScale - bottomRightRadius: 20 * Theme.uiScale + bottomLeftRadius: 20 * Theme.scale(Screen) + bottomRightRadius: 20 * Theme.scale(Screen) ColumnLayout { id: infoColumn @@ -343,7 +343,7 @@ WlSessionLock { id: timeText text: Qt.formatDateTime(new Date(), "HH:mm") font.family: Theme.fontFamily - font.pixelSize: 48 * Theme.uiScale + font.pixelSize: 48 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary horizontalAlignment: Text.AlignHCenter @@ -353,7 +353,7 @@ WlSessionLock { id: dateText text: Qt.formatDateTime(new Date(), "dddd, MMMM d") font.family: Theme.fontFamily - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textSecondary opacity: 0.8 horizontalAlignment: Text.AlignHCenter @@ -369,7 +369,7 @@ WlSessionLock { Text { text: weatherData && weatherData.current_weather ? materialSymbolForCode(weatherData.current_weather.weathercode) : "cloud" font.family: "Material Symbols Outlined" - font.pixelSize: 28 * Theme.uiScale + font.pixelSize: 28 * Theme.scale(Screen) color: Theme.accentPrimary verticalAlignment: Text.AlignVCenter } @@ -377,7 +377,7 @@ WlSessionLock { Text { text: weatherData && weatherData.current_weather ? ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? `${Math.round(weatherData.current_weather.temperature * 9 / 5 + 32)}°F` : `${Math.round(weatherData.current_weather.temperature)}°C`) : ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? "--°F" : "--°C") font.family: Theme.fontFamily - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: Theme.textSecondary verticalAlignment: Text.AlignVCenter } @@ -388,7 +388,7 @@ WlSessionLock { color: Theme.error visible: weatherError !== "" font.family: Theme.fontFamily - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter } @@ -430,12 +430,12 @@ WlSessionLock { spacing: 12 Rectangle { - width: 48 * Theme.uiScale - height: 48 * Theme.uiScale - radius: 24 * Theme.uiScale + width: 48 * Theme.scale(Screen) + height: 48 * Theme.scale(Screen) + radius: 24 * Theme.scale(Screen) color: shutdownArea.containsMouse ? Theme.error : "transparent" border.color: Theme.error - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MouseArea { id: shutdownArea @@ -450,18 +450,18 @@ WlSessionLock { anchors.centerIn: parent text: "power_settings_new" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: shutdownArea.containsMouse ? Theme.onAccent : Theme.error } } Rectangle { - width: 48 * Theme.uiScale - height: 48 * Theme.uiScale - radius: 24 * Theme.uiScale + width: 48 * Theme.scale(Screen) + height: 48 * Theme.scale(Screen) + radius: 24 * Theme.scale(Screen) color: rebootArea.containsMouse ? Theme.accentPrimary : "transparent" border.color: Theme.accentPrimary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MouseArea { id: rebootArea @@ -476,18 +476,18 @@ WlSessionLock { anchors.centerIn: parent text: "refresh" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: rebootArea.containsMouse ? Theme.onAccent : Theme.accentPrimary } } Rectangle { - width: 48 * Theme.uiScale - height: 48 * Theme.uiScale - radius: 24 * Theme.uiScale + width: 48 * Theme.scale(Screen) + height: 48 * Theme.scale(Screen) + radius: 24 * Theme.scale(Screen) color: logoutArea.containsMouse ? Theme.accentSecondary : "transparent" border.color: Theme.accentSecondary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MouseArea { id: logoutArea @@ -502,7 +502,7 @@ WlSessionLock { anchors.centerIn: parent text: "exit_to_app" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: logoutArea.containsMouse ? Theme.onAccent : Theme.accentSecondary } } diff --git a/Widgets/Notification/NotificationIcon.qml b/Widgets/Notification/NotificationIcon.qml index 586d977..dfc75a4 100644 --- a/Widgets/Notification/NotificationIcon.qml +++ b/Widgets/Notification/NotificationIcon.qml @@ -42,7 +42,7 @@ Item { } } font.family: mouseAreaBell.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) font.weight: { if (shell && shell.notificationHistoryWin && shell.notificationHistoryWin.hasUnread) { return Font.Bold; diff --git a/Widgets/SettingsWindow/SettingsWindow.qml b/Widgets/SettingsWindow/SettingsWindow.qml index efb2e3c..593c386 100644 --- a/Widgets/SettingsWindow/SettingsWindow.qml +++ b/Widgets/SettingsWindow/SettingsWindow.qml @@ -148,8 +148,8 @@ PanelWithOverlay { Rectangle { id: settingsWindowRect - implicitWidth: Quickshell.screens.length > 0 ? Math.min(Quickshell.screens[0].width * 2 / 3, 1200) * Theme.uiScale : 600 * Theme.uiScale - implicitHeight: Quickshell.screens.length > 0 ? Math.min(Quickshell.screens[0].height * 2 / 3, 800) * Theme.uiScale : 400 * Theme.uiScale + implicitWidth: Quickshell.screens.length > 0 ? Math.min(Quickshell.screens[0].width * 2 / 3, 1200) * Theme.scale(Screen) : 600 * Theme.scale(Screen) + implicitHeight: Quickshell.screens.length > 0 ? Math.min(Quickshell.screens[0].height * 2 / 3, 800) * Theme.scale(Screen) : 400 * Theme.scale(Screen) visible: parent.visible color: "transparent" // Center the settings window on screen @@ -166,9 +166,9 @@ PanelWithOverlay { color: Theme.backgroundPrimary anchors.fill: parent - radius: 20 * Theme.uiScale + radius: 20 * Theme.scale(Screen) border.color: Theme.outline - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MultiEffect { source: background @@ -188,8 +188,8 @@ PanelWithOverlay { clip: true color: Theme.backgroundPrimary - topRightRadius: 20 * Theme.uiScale - bottomRightRadius: 20 * Theme.uiScale + topRightRadius: 20 * Theme.scale(Screen) + bottomRightRadius: 20 * Theme.scale(Screen) anchors { left: tabs.right @@ -202,7 +202,7 @@ PanelWithOverlay { Rectangle { id: headerArea - height: 48 * Theme.uiScale + height: 48 * Theme.scale(Screen) color: "transparent" anchors { @@ -214,13 +214,13 @@ PanelWithOverlay { RowLayout { anchors.fill: parent - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Text { id: tabName text: wallpaperSelector.visible ? "Select Wallpaper" : (activeTabIndex === 0 ? "General" : activeTabIndex === 1 ? "Bar" : activeTabIndex === 2 ? "Time & Weather" : activeTabIndex === 3 ? "Screen Recorder" : activeTabIndex === 4 ? "Network" : activeTabIndex === 5 ? "Display" : activeTabIndex === 6 ? "Wallpaper" : activeTabIndex === 7 ? "Misc" : activeTabIndex === 8 ? "About" : "General") - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary Layout.fillWidth: true @@ -228,29 +228,29 @@ PanelWithOverlay { // Wallpaper Selection Button (only visible on Wallpaper tab) Rectangle { - width: 160 * Theme.uiScale - height: 32 * Theme.uiScale - radius: 16 * Theme.uiScale + width: 160 * Theme.scale(Screen) + height: 32 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: wallpaperButtonArea.containsMouse ? Theme.accentPrimary : "transparent" border.color: Theme.accentPrimary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) visible: activeTabIndex === 6 // Wallpaper tab index Row { anchors.centerIn: parent - spacing: 6 * Theme.uiScale + spacing: 6 * Theme.scale(Screen) Text { text: "image" font.family: wallpaperButtonArea.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: wallpaperButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary anchors.verticalCenter: parent.verticalCenter } Text { text: "Select Wallpaper" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: wallpaperButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary anchors.verticalCenter: parent.verticalCenter @@ -273,18 +273,18 @@ PanelWithOverlay { } Rectangle { - width: 32 * Theme.uiScale - height: 32 * Theme.uiScale - radius: 16 * Theme.uiScale + width: 32 * Theme.scale(Screen) + height: 32 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent" border.color: Theme.accentPrimary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) Text { anchors.centerIn: parent text: "close" font.family: closeButtonArea.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: closeButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary } @@ -304,7 +304,7 @@ PanelWithOverlay { } Rectangle { - height: 1 * Theme.uiScale + height: 1 * Theme.scale(Screen) color: Theme.outline opacity: 0.3 @@ -353,16 +353,16 @@ PanelWithOverlay { color: Theme.surface width: parent.width * 0.25 height: settingsWindowRect.height - topLeftRadius: 20 * Theme.uiScale - bottomLeftRadius: 20 * Theme.uiScale + topLeftRadius: 20 * Theme.scale(Screen) + bottomLeftRadius: 20 * Theme.scale(Screen) border.color: Theme.outline - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) Column { width: parent.width - spacing: 0 * Theme.uiScale - topPadding: 8 * Theme.uiScale - bottomPadding: 8 * Theme.uiScale + spacing: 0 * Theme.scale(Screen) + topPadding: 8 * Theme.scale(Screen) + bottomPadding: 8 * Theme.scale(Screen) Repeater { id: repeater @@ -398,21 +398,21 @@ PanelWithOverlay { delegate: Rectangle { width: tabs.width - height: 48 * Theme.uiScale + height: 48 * Theme.scale(Screen) color: "transparent" RowLayout { anchors.fill: parent - spacing: 8 * Theme.uiScale + spacing: 8 * Theme.scale(Screen) Rectangle { id: activeIndicator - Layout.leftMargin: 8 * Theme.uiScale - Layout.preferredWidth: 3 * Theme.uiScale - Layout.preferredHeight: 24 * Theme.uiScale + Layout.leftMargin: 8 * Theme.scale(Screen) + Layout.preferredWidth: 3 * Theme.scale(Screen) + Layout.preferredHeight: 24 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter - radius: 2 * Theme.uiScale + radius: 2 * Theme.scale(Screen) color: Theme.accentPrimary opacity: index === activeTabIndex ? 1 : 0 @@ -430,12 +430,12 @@ PanelWithOverlay { text: modelData.icon font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: index === activeTabIndex ? Theme.accentPrimary : Theme.textPrimary opacity: index === activeTabIndex ? 1 : 0.8 - Layout.leftMargin: 20 * Theme.uiScale - Layout.preferredWidth: 24 * Theme.uiScale - Layout.preferredHeight: 24 * Theme.uiScale + Layout.leftMargin: 20 * Theme.scale(Screen) + Layout.preferredWidth: 24 * Theme.scale(Screen) + Layout.preferredHeight: 24 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -446,14 +446,14 @@ PanelWithOverlay { id: label text: modelData.text - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: index === activeTabIndex ? Theme.accentPrimary : (tabMouseArea.containsMouse ? Theme.accentPrimary : Theme.textSecondary) font.weight: index === activeTabIndex ? Font.DemiBold : (tabMouseArea.containsMouse ? Font.DemiBold : Font.Normal) Layout.fillWidth: true - Layout.preferredHeight: 24 * Theme.uiScale + Layout.preferredHeight: 24 * Theme.scale(Screen) Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.leftMargin: 4 * Theme.uiScale - Layout.rightMargin: 16 * Theme.uiScale + Layout.leftMargin: 4 * Theme.scale(Screen) + Layout.rightMargin: 16 * Theme.scale(Screen) verticalAlignment: Text.AlignVCenter } @@ -473,7 +473,7 @@ PanelWithOverlay { Rectangle { width: parent.width - height: 1 * Theme.uiScale + height: 1 * Theme.scale(Screen) color: Theme.outline opacity: 0.6 visible: index < (repeater.count - 1) diff --git a/Widgets/SettingsWindow/Tabs/About.qml b/Widgets/SettingsWindow/Tabs/About.qml index 2e60129..a1b3244 100644 --- a/Widgets/SettingsWindow/Tabs/About.qml +++ b/Widgets/SettingsWindow/Tabs/About.qml @@ -168,19 +168,19 @@ ColumnLayout { Text { text: "Noctalia: quiet by design" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary Layout.alignment: Qt.AlignCenter - Layout.bottomMargin: 8 * Theme.uiScale + Layout.bottomMargin: 8 * Theme.scale(Screen) } Text { text: "It may just be another quickshell setup but it won't get in your way." - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: Theme.textSecondary Layout.alignment: Qt.AlignCenter - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } GridLayout { @@ -191,28 +191,28 @@ ColumnLayout { Text { text: "Latest Version:" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textSecondary Layout.alignment: Qt.AlignRight } Text { text: root.latestVersion - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textPrimary font.bold: true } Text { text: "Installed Version:" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textSecondary Layout.alignment: Qt.AlignRight } Text { text: root.currentVersion - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: Theme.textPrimary font.bold: true } @@ -254,7 +254,7 @@ ColumnLayout { Text { text: "system_update" font.family: "Material Symbols Outlined" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) color: updateArea.containsMouse ? Theme.backgroundPrimary : Theme.accentPrimary } @@ -262,7 +262,7 @@ ColumnLayout { id: updateText text: "Download latest release" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: updateArea.containsMouse ? Theme.backgroundPrimary : Theme.accentPrimary } @@ -305,14 +305,14 @@ ColumnLayout { Text { text: "Contributors" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "(" + root.contributors.length + ")" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: Theme.textSecondary } @@ -385,7 +385,7 @@ ColumnLayout { anchors.centerIn: parent text: "person" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: contributorArea.containsMouse ? Theme.backgroundPrimary : Theme.textPrimary visible: !avatarImage.source || avatarImage.status !== Image.Ready } @@ -399,7 +399,7 @@ ColumnLayout { Text { text: modelData.login || "Unknown" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: contributorArea.containsMouse ? Theme.backgroundPrimary : Theme.textPrimary elide: Text.ElideRight Layout.fillWidth: true @@ -407,7 +407,7 @@ ColumnLayout { Text { text: (modelData.contributions || 0) + " commits" - font.pixelSize: 11 * Theme.uiScale + font.pixelSize: 11 * Theme.scale(Screen) color: contributorArea.containsMouse ? Theme.backgroundPrimary : Theme.textSecondary } diff --git a/Widgets/SettingsWindow/Tabs/Bar.qml b/Widgets/SettingsWindow/Tabs/Bar.qml index d0966fe..f37af0f 100644 --- a/Widgets/SettingsWindow/Tabs/Bar.qml +++ b/Widgets/SettingsWindow/Tabs/Bar.qml @@ -28,10 +28,10 @@ ColumnLayout { Text { text: "Elements" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ToggleOption { diff --git a/Widgets/SettingsWindow/Tabs/Components/UnitSelector.qml b/Widgets/SettingsWindow/Tabs/Components/UnitSelector.qml index 60b3124..5ef776d 100644 --- a/Widgets/SettingsWindow/Tabs/Components/UnitSelector.qml +++ b/Widgets/SettingsWindow/Tabs/Components/UnitSelector.qml @@ -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 diff --git a/Widgets/SettingsWindow/Tabs/Components/WallpaperSelector.qml b/Widgets/SettingsWindow/Tabs/Components/WallpaperSelector.qml index c70f783..ab28d4e 100644 --- a/Widgets/SettingsWindow/Tabs/Components/WallpaperSelector.qml +++ b/Widgets/SettingsWindow/Tabs/Components/WallpaperSelector.qml @@ -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) } } diff --git a/Widgets/SettingsWindow/Tabs/Display.qml b/Widgets/SettingsWindow/Tabs/Display.qml index b71b98b..85e2623 100644 --- a/Widgets/SettingsWindow/Tabs/Display.qml +++ b/Widgets/SettingsWindow/Tabs/Display.qml @@ -43,10 +43,10 @@ ColumnLayout { Text { text: "Monitor Selection" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ColumnLayout { @@ -65,14 +65,14 @@ ColumnLayout { Text { text: "Bar Monitors" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Select which monitors to display the top panel/bar on" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true @@ -112,14 +112,14 @@ ColumnLayout { Text { text: barCheckbox.isChecked ? "check" : "" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: barCheckbox.isChecked ? Theme.onAccent : Theme.textSecondary visible: barCheckbox.isChecked } Text { text: modelData.name || "Unknown" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: barCheckbox.isChecked ? Theme.onAccent : Theme.textPrimary } } @@ -169,14 +169,14 @@ ColumnLayout { Text { text: "Dock Monitors" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Select which monitors to display the application dock on" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true @@ -216,14 +216,14 @@ ColumnLayout { Text { text: dockCheckbox.isChecked ? "check" : "" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: dockCheckbox.isChecked ? Theme.onAccent : Theme.textSecondary visible: dockCheckbox.isChecked } Text { text: modelData.name || "Unknown" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: dockCheckbox.isChecked ? Theme.onAccent : Theme.textPrimary } } @@ -276,14 +276,14 @@ ColumnLayout { Text { text: "Notification Monitors" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Select which monitors to display system notifications on" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true @@ -323,14 +323,14 @@ ColumnLayout { Text { text: notificationCheckbox.isChecked ? "check" : "" font.family: "Material Symbols Outlined" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: notificationCheckbox.isChecked ? Theme.onAccent : Theme.textSecondary visible: notificationCheckbox.isChecked } Text { text: modelData.name || "Unknown" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: notificationCheckbox.isChecked ? Theme.onAccent : Theme.textPrimary } } diff --git a/Widgets/SettingsWindow/Tabs/General.qml b/Widgets/SettingsWindow/Tabs/General.qml index c6058fc..5cbc059 100644 --- a/Widgets/SettingsWindow/Tabs/General.qml +++ b/Widgets/SettingsWindow/Tabs/General.qml @@ -28,23 +28,23 @@ ColumnLayout { Text { text: "Profile" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } Text { text: "Profile Image" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 4 * Theme.uiScale + Layout.bottomMargin: 4 * Theme.scale(Screen) } Text { text: "Your profile picture displayed in various places throughout the shell" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true @@ -52,20 +52,20 @@ ColumnLayout { } RowLayout { - spacing: 8 * Theme.uiScale + spacing: 8 * Theme.scale(Screen) Layout.fillWidth: true Rectangle { - width: 48 * Theme.uiScale - height: 48 * Theme.uiScale - radius: 24 * Theme.uiScale + width: 48 * Theme.scale(Screen) + height: 48 * Theme.scale(Screen) + radius: 24 * Theme.scale(Screen) Rectangle { anchors.fill: parent color: "transparent" - radius: 24 * Theme.uiScale + radius: 24 * Theme.scale(Screen) border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) z: 2 } @@ -76,22 +76,22 @@ ColumnLayout { Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 40 * Theme.uiScale - radius: 16 * Theme.uiScale + Layout.preferredHeight: 40 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: Theme.surfaceVariant border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) TextInput { id: profileImageInput anchors.fill: parent - anchors.leftMargin: 12 * Theme.uiScale - anchors.rightMargin: 12 * Theme.uiScale - anchors.topMargin: 6 * Theme.uiScale - anchors.bottomMargin: 6 * Theme.uiScale + anchors.leftMargin: 12 * Theme.scale(Screen) + anchors.rightMargin: 12 * Theme.scale(Screen) + anchors.topMargin: 6 * Theme.scale(Screen) + anchors.bottomMargin: 6 * Theme.scale(Screen) text: Settings.settings.profileImage - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: TextInput.AlignVCenter clip: true @@ -117,19 +117,19 @@ ColumnLayout { // Separator Rectangle { Layout.fillWidth: true - Layout.topMargin: 26 * Theme.uiScale - Layout.bottomMargin: 18 * Theme.uiScale - height: 1 * Theme.uiScale + Layout.topMargin: 26 * Theme.scale(Screen) + Layout.bottomMargin: 18 * Theme.scale(Screen) + height: 1 * Theme.scale(Screen) color: Theme.outline opacity: 0.3 } Text { text: "User Interface" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ToggleOption { diff --git a/Widgets/SettingsWindow/Tabs/Misc.qml b/Widgets/SettingsWindow/Tabs/Misc.qml index 861d93d..4281e25 100644 --- a/Widgets/SettingsWindow/Tabs/Misc.qml +++ b/Widgets/SettingsWindow/Tabs/Misc.qml @@ -28,10 +28,10 @@ ColumnLayout { Text { text: "Media" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ColumnLayout { @@ -40,14 +40,14 @@ ColumnLayout { Text { text: "Visualizer Type" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Choose the style of the audio visualizer" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true diff --git a/Widgets/SettingsWindow/Tabs/Network.qml b/Widgets/SettingsWindow/Tabs/Network.qml index 5bc582c..09ec6ce 100644 --- a/Widgets/SettingsWindow/Tabs/Network.qml +++ b/Widgets/SettingsWindow/Tabs/Network.qml @@ -30,10 +30,10 @@ ColumnLayout { Text { text: "Wi-Fi" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ToggleOption { @@ -58,10 +58,10 @@ ColumnLayout { Text { text: "Bluetooth" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ToggleOption { diff --git a/Widgets/SettingsWindow/Tabs/ScreenRecorder.qml b/Widgets/SettingsWindow/Tabs/ScreenRecorder.qml index ccb9250..166bf06 100644 --- a/Widgets/SettingsWindow/Tabs/ScreenRecorder.qml +++ b/Widgets/SettingsWindow/Tabs/ScreenRecorder.qml @@ -34,7 +34,7 @@ ColumnLayout { ColumnLayout { // Text { // text: "Screen Recording" - // font.pixelSize: 18 * Theme.uiScale + // font.pixelSize: 18 * Theme.scale(Screen) // font.bold: true // color: Theme.textPrimary // Layout.bottomMargin: 8 @@ -49,14 +49,14 @@ ColumnLayout { Text { text: "Output Directory" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Directory where screen recordings will be saved" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -78,7 +78,7 @@ ColumnLayout { anchors.topMargin: 6 anchors.bottomMargin: 6 text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : "" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: TextInput.AlignVCenter clip: true @@ -108,14 +108,14 @@ ColumnLayout { Text { text: "Frame Rate" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Target frame rate for screen recordings (default: 60)" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -144,7 +144,7 @@ ColumnLayout { contentItem: TextInput { text: frameRateSpinBox.textFromValue(frameRateSpinBox.value, frameRateSpinBox.locale) - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary selectionColor: Theme.accentPrimary selectedTextColor: Theme.onAccent @@ -183,7 +183,7 @@ ColumnLayout { Text { text: "add" font.family: "Material Symbols Outlined" - font.pixelSize: 20 * Theme.uiScale + font.pixelSize: 20 * Theme.scale(Screen) color: Theme.textPrimary anchors.centerIn: parent } @@ -200,7 +200,7 @@ ColumnLayout { Text { text: "remove" font.family: "Material Symbols Outlined" - font.pixelSize: 20 * Theme.uiScale + font.pixelSize: 20 * Theme.scale(Screen) color: Theme.textPrimary anchors.centerIn: parent } @@ -218,14 +218,14 @@ ColumnLayout { Text { text: "Audio Source" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Audio source to capture during recording" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -265,7 +265,7 @@ ColumnLayout { return audioSourceComboBox.currentText; } } - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -276,7 +276,7 @@ ColumnLayout { y: audioSourceComboBox.topPadding + (audioSourceComboBox.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -323,7 +323,7 @@ ColumnLayout { return modelData; } } - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -346,14 +346,14 @@ ColumnLayout { Text { text: "Video Quality" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Higher quality results in larger file sizes" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -395,7 +395,7 @@ ColumnLayout { return qualityComboBox.currentText; } } - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -406,7 +406,7 @@ ColumnLayout { y: qualityComboBox.topPadding + (qualityComboBox.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -455,7 +455,7 @@ ColumnLayout { return modelData; } } - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -478,14 +478,14 @@ ColumnLayout { Text { text: "Video Codec" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Different codecs offer different compression and compatibility" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -514,7 +514,7 @@ ColumnLayout { leftPadding: 12 rightPadding: codecComboBox.indicator.width + codecComboBox.spacing text: codecComboBox.currentText.toUpperCase() - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -525,7 +525,7 @@ ColumnLayout { y: codecComboBox.topPadding + (codecComboBox.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -561,7 +561,7 @@ ColumnLayout { contentItem: Text { text: modelData.toUpperCase() - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -584,14 +584,14 @@ ColumnLayout { Text { text: "Audio Codec" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Opus is recommended for best performance and smallest audio size" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -620,7 +620,7 @@ ColumnLayout { leftPadding: 12 rightPadding: audioCodecComboBox.indicator.width + audioCodecComboBox.spacing text: audioCodecComboBox.currentText.toUpperCase() - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -631,7 +631,7 @@ ColumnLayout { y: audioCodecComboBox.topPadding + (audioCodecComboBox.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -667,7 +667,7 @@ ColumnLayout { contentItem: Text { text: modelData.toUpperCase() - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -691,14 +691,14 @@ ColumnLayout { Text { text: "Color Range" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Limited is recommended for better compatibility" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.bottomMargin: 4 } @@ -727,7 +727,7 @@ ColumnLayout { leftPadding: 12 rightPadding: colorRangeComboBox.indicator.width + colorRangeComboBox.spacing text: colorRangeComboBox.currentText.charAt(0).toUpperCase() + colorRangeComboBox.currentText.slice(1) - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -738,7 +738,7 @@ ColumnLayout { y: colorRangeComboBox.topPadding + (colorRangeComboBox.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -774,7 +774,7 @@ ColumnLayout { contentItem: Text { text: modelData.charAt(0).toUpperCase() + modelData.slice(1) - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight diff --git a/Widgets/SettingsWindow/Tabs/TimeWeather.qml b/Widgets/SettingsWindow/Tabs/TimeWeather.qml index 3ae3205..e228df6 100644 --- a/Widgets/SettingsWindow/Tabs/TimeWeather.qml +++ b/Widgets/SettingsWindow/Tabs/TimeWeather.qml @@ -29,10 +29,10 @@ ColumnLayout { Text { text: "Time" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ToggleOption { @@ -64,27 +64,27 @@ ColumnLayout { Text { text: "Weather" - font.pixelSize: 18 * Theme.uiScale + font.pixelSize: 18 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary - Layout.bottomMargin: 16 * Theme.uiScale + Layout.bottomMargin: 16 * Theme.scale(Screen) } ColumnLayout { spacing: 8 Layout.fillWidth: true - Layout.bottomMargin: 8 * Theme.uiScale + Layout.bottomMargin: 8 * Theme.scale(Screen) Text { text: "City" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Your city name for weather information" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary Layout.fillWidth: true } @@ -106,7 +106,7 @@ ColumnLayout { anchors.topMargin: 6 anchors.bottomMargin: 6 text: Settings.settings.weatherCity - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: TextInput.AlignVCenter clip: true @@ -147,14 +147,14 @@ ColumnLayout { Text { text: "Temperature Unit" - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: "Choose between Celsius and Fahrenheit" - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary wrapMode: Text.WordWrap Layout.fillWidth: true diff --git a/Widgets/SidePanel/Button.qml b/Widgets/SidePanel/Button.qml index 94c9e65..d4b2b51 100644 --- a/Widgets/SidePanel/Button.qml +++ b/Widgets/SidePanel/Button.qml @@ -44,7 +44,7 @@ Item { id: iconText text: "dashboard" font.family: isActive ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: sidebarPopup.visible ? Theme.accentPrimary : Theme.textPrimary anchors.centerIn: parent z: 1 diff --git a/Widgets/SidePanel/Music.qml b/Widgets/SidePanel/Music.qml index c51a546..95ec4e4 100644 --- a/Widgets/SidePanel/Music.qml +++ b/Widgets/SidePanel/Music.qml @@ -8,15 +8,15 @@ import qs.Services Rectangle { id: musicCard - width: 360 * Theme.uiScale - height: 250 * Theme.uiScale + width: 360 * Theme.scale(Screen) + height: 250 * Theme.scale(Screen) color: "transparent" Rectangle { id: card anchors.fill: parent color: Theme.surface - radius: 18 * Theme.uiScale + radius: 18 * Theme.scale(Screen) // Show fallback UI if no player is available Item { @@ -26,12 +26,12 @@ Rectangle { ColumnLayout { anchors.centerIn: parent - spacing: 16 * Theme.uiScale + spacing: 16 * Theme.scale(Screen) Text { text: "music_note" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeHeader * Theme.uiScale + font.pixelSize: Theme.fontSizeHeader * Theme.scale(Screen) color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.3) Layout.alignment: Qt.AlignHCenter } @@ -40,7 +40,7 @@ Rectangle { text: MusicManager.hasPlayer ? "No controllable player selected" : "No music player detected" color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.6) font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter } } @@ -49,45 +49,45 @@ Rectangle { // Main player UI ColumnLayout { anchors.fill: parent - anchors.margins: 18 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.margins: 18 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) visible: !!MusicManager.currentPlayer // Player selector ComboBox { id: playerSelector Layout.fillWidth: true - Layout.preferredHeight: 40 * Theme.uiScale + Layout.preferredHeight: 40 * Theme.scale(Screen) visible: MusicManager.getAvailablePlayers().length > 1 model: MusicManager.getAvailablePlayers() textRole: "identity" currentIndex: MusicManager.selectedPlayerIndex background: Rectangle { - implicitWidth: 120 * Theme.uiScale - implicitHeight: 40 * Theme.uiScale + implicitWidth: 120 * Theme.scale(Screen) + implicitHeight: 40 * Theme.scale(Screen) color: Theme.surfaceVariant border.color: playerSelector.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 * Theme.uiScale - radius: 16 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) } contentItem: Text { - leftPadding: 12 * Theme.uiScale + leftPadding: 12 * Theme.scale(Screen) rightPadding: playerSelector.indicator.width + playerSelector.spacing text: playerSelector.displayText - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } indicator: Text { - x: playerSelector.width - width - 12 * Theme.uiScale + x: playerSelector.width - width - 12 * Theme.scale(Screen) y: playerSelector.topPadding + (playerSelector.availableHeight - height) / 2 text: "arrow_drop_down" font.family: "Material Symbols Outlined" - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) color: Theme.textPrimary } @@ -95,7 +95,7 @@ Rectangle { y: playerSelector.height width: playerSelector.width implicitHeight: contentItem.implicitHeight - padding: 1 * Theme.uiScale + padding: 1 * Theme.scale(Screen) contentItem: ListView { clip: true @@ -109,8 +109,8 @@ Rectangle { background: Rectangle { color: Theme.surfaceVariant border.color: Theme.outline - border.width: 1 * Theme.uiScale - radius: 16 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) } } @@ -118,7 +118,7 @@ Rectangle { width: playerSelector.width contentItem: Text { text: modelData.identity - font.pixelSize: 13 * Theme.uiScale + font.pixelSize: 13 * Theme.scale(Screen) color: Theme.textPrimary verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -138,14 +138,14 @@ Rectangle { // Album art with spectrum visualizer RowLayout { - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Layout.fillWidth: true // Album art container with circular spectrum overlay Item { id: albumArtContainer - width: 96 * Theme.uiScale - height: 96 * Theme.uiScale // enough for spectrum and art (will adjust if needed) + width: 96 * Theme.scale(Screen) + height: 96 * Theme.scale(Screen) // enough for spectrum and art (will adjust if needed) Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter // Circular spectrum visualizer around album art @@ -153,36 +153,36 @@ Rectangle { id: spectrum values: MusicManager.cavaValues anchors.centerIn: parent - innerRadius: 30 * Theme.uiScale // Position just outside 60x60 album art - outerRadius: 48 * Theme.uiScale // Extend bars outward from album art + innerRadius: 30 * Theme.scale(Screen) // Position just outside 60x60 album art + outerRadius: 48 * Theme.scale(Screen) // Extend bars outward from album art fillColor: Theme.accentPrimary strokeColor: Theme.accentPrimary - strokeWidth: 0 * Theme.uiScale + strokeWidth: 0 * Theme.scale(Screen) z: 0 } // Album art image Rectangle { id: albumArtwork - width: 60 * Theme.uiScale - height: 60 * Theme.uiScale + width: 60 * Theme.scale(Screen) + height: 60 * Theme.scale(Screen) anchors.centerIn: parent - radius: 30 * Theme.uiScale // circle + radius: 30 * Theme.scale(Screen) // circle color: Qt.darker(Theme.surface, 1.1) border.color: Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.3) - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) Image { id: albumArt anchors.fill: parent - anchors.margins: 2 * Theme.uiScale + anchors.margins: 2 * Theme.scale(Screen) fillMode: Image.PreserveAspectCrop smooth: true mipmap: true cache: false asynchronous: true - sourceSize.width: 60 * Theme.uiScale - sourceSize.height: 60 * Theme.uiScale + sourceSize.width: 60 * Theme.scale(Screen) + sourceSize.height: 60 * Theme.scale(Screen) source: MusicManager.trackArtUrl visible: source.toString() !== "" @@ -213,7 +213,7 @@ Rectangle { anchors.centerIn: parent text: "album" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.4) visible: !albumArt.visible } @@ -223,13 +223,13 @@ Rectangle { // Track metadata ColumnLayout { Layout.fillWidth: true - spacing: 4 * Theme.uiScale + spacing: 4 * Theme.scale(Screen) Text { text: MusicManager.trackTitle color: Theme.textPrimary font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeSmall * Theme.uiScale + font.pixelSize: Theme.fontSizeSmall * Theme.scale(Screen) font.bold: true elide: Text.ElideRight wrapMode: Text.Wrap @@ -241,7 +241,7 @@ Rectangle { text: MusicManager.trackArtist color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.8) font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeCaption * Theme.uiScale + font.pixelSize: Theme.fontSizeCaption * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -250,7 +250,7 @@ Rectangle { text: MusicManager.trackAlbum color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.6) font.family: Theme.fontFamily - font.pixelSize: Theme.fontSizeCaption * Theme.uiScale + font.pixelSize: Theme.fontSizeCaption * Theme.scale(Screen) elide: Text.ElideRight Layout.fillWidth: true } @@ -261,8 +261,8 @@ Rectangle { Rectangle { id: progressBarBackground width: parent.width - height: 6 * Theme.uiScale - radius: 3 * Theme.uiScale + height: 6 * Theme.scale(Screen) + radius: 3 * Theme.scale(Screen) color: Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.15) Layout.fillWidth: true @@ -290,12 +290,12 @@ Rectangle { // Interactive progress handle Rectangle { id: progressHandle - width: 12 * Theme.uiScale - height: 12 * Theme.uiScale - radius: 6 * Theme.uiScale + width: 12 * Theme.scale(Screen) + height: 12 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: Theme.accentPrimary border.color: Qt.lighter(Theme.accentPrimary, 1.3) - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) x: Math.max(0, Math.min(parent.width - width, progressFill.width - width / 2)) anchors.verticalCenter: parent.verticalCenter @@ -334,18 +334,18 @@ Rectangle { // Media controls RowLayout { - spacing: 4 * Theme.uiScale + spacing: 4 * Theme.scale(Screen) Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter // Previous button Rectangle { - width: 28 * Theme.uiScale - height: 28 * Theme.uiScale - radius: 14 * Theme.uiScale + width: 28 * Theme.scale(Screen) + height: 28 * Theme.scale(Screen) + radius: 14 * Theme.scale(Screen) color: previousButton.containsMouse ? Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.2) : Qt.darker(Theme.surface, 1.1) border.color: Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.3) - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MouseArea { id: previousButton @@ -360,19 +360,19 @@ Rectangle { anchors.centerIn: parent text: "skip_previous" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeCaption * Theme.uiScale + font.pixelSize: Theme.fontSizeCaption * Theme.scale(Screen) color: previousButton.enabled ? Theme.accentPrimary : Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.3) } } // Play/Pause button 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) color: playButton.containsMouse ? Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.2) : Qt.darker(Theme.surface, 1.1) border.color: Theme.accentPrimary - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) MouseArea { id: playButton @@ -387,19 +387,19 @@ Rectangle { anchors.centerIn: parent text: MusicManager.isPlaying ? "pause" : "play_arrow" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeBody * Theme.uiScale + font.pixelSize: Theme.fontSizeBody * Theme.scale(Screen) color: playButton.enabled ? Theme.accentPrimary : Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.3) } } // Next button Rectangle { - width: 28 * Theme.uiScale - height: 28 * Theme.uiScale - radius: 14 * Theme.uiScale + width: 28 * Theme.scale(Screen) + height: 28 * Theme.scale(Screen) + radius: 14 * Theme.scale(Screen) color: nextButton.containsMouse ? Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.2) : Qt.darker(Theme.surface, 1.1) border.color: Qt.rgba(Theme.accentPrimary.r, Theme.accentPrimary.g, Theme.accentPrimary.b, 0.3) - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) MouseArea { id: nextButton @@ -414,7 +414,7 @@ Rectangle { anchors.centerIn: parent text: "skip_next" font.family: "Material Symbols Outlined" - font.pixelSize: Theme.fontSizeCaption * Theme.uiScale + font.pixelSize: Theme.fontSizeCaption * Theme.scale(Screen) color: nextButton.enabled ? Theme.accentPrimary : Qt.rgba(Theme.textPrimary.r, Theme.textPrimary.g, Theme.textPrimary.b, 0.3) } } diff --git a/Widgets/SidePanel/PanelPopup.qml b/Widgets/SidePanel/PanelPopup.qml index 1a69956..a3dbf86 100644 --- a/Widgets/SidePanel/PanelPopup.qml +++ b/Widgets/SidePanel/PanelPopup.qml @@ -45,8 +45,8 @@ PanelWithOverlay { property real slideOffset: width property bool isAnimating: false - property int leftPadding: 20 * Theme.uiScale - property int bottomPadding: 20 * Theme.uiScale + property int leftPadding: 20 * Theme.scale(Screen) + property int bottomPadding: 20 * Theme.scale(Screen) // Recording properties property bool isRecording: false @@ -126,8 +126,8 @@ PanelWithOverlay { isRecording = false; } - implicitWidth: 500 * Theme.uiScale - implicitHeight: 700 * Theme.uiScale + implicitWidth: 500 * Theme.scale(Screen) + implicitHeight: 700 * Theme.scale(Screen) visible: parent.visible color: "transparent" anchors.top: parent.top @@ -176,7 +176,7 @@ PanelWithOverlay { x: sidebarPopupRect.leftPadding + sidebarPopupRect.slideOffset y: 0 color: Theme.backgroundPrimary - bottomLeftRadius: 20 * Theme.uiScale + bottomLeftRadius: 20 * Theme.scale(Screen) z: 0 Behavior on x { @@ -211,8 +211,8 @@ PanelWithOverlay { ColumnLayout { anchors.fill: parent - anchors.margins: 20 * Theme.uiScale - spacing: 4 * Theme.uiScale + anchors.margins: 20 * Theme.scale(Screen) + spacing: 4 * Theme.scale(Screen) PowerMenu { id: systemWidget @@ -230,7 +230,7 @@ PanelWithOverlay { // Music and System Monitor row RowLayout { - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter @@ -248,37 +248,37 @@ PanelWithOverlay { // Power profile, Record and Wallpaper row RowLayout { Layout.alignment: Qt.AlignVCenter - spacing: 10 * Theme.uiScale - Layout.preferredHeight: 80 * Theme.uiScale + spacing: 10 * Theme.scale(Screen) + Layout.preferredHeight: 80 * Theme.scale(Screen) z: 3 PowerProfile { Layout.alignment: Qt.AlignVCenter - Layout.preferredHeight: 80 * Theme.uiScale + Layout.preferredHeight: 80 * Theme.scale(Screen) } // Record and Wallpaper card Rectangle { - Layout.preferredHeight: 80 * Theme.uiScale - Layout.preferredWidth: 140 * Theme.uiScale + Layout.preferredHeight: 80 * Theme.scale(Screen) + Layout.preferredWidth: 140 * Theme.scale(Screen) Layout.fillWidth: false 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) // Record button Rectangle { id: recordButton - 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: sidebarPopupRect.isRecording ? Theme.accentPrimary : (recordButtonArea.containsMouse ? Theme.accentPrimary : "transparent") @@ -286,7 +286,7 @@ PanelWithOverlay { anchors.centerIn: parent text: "photo_camera" font.family: "Material Symbols Outlined" - font.pixelSize: 22 * Theme.uiScale + font.pixelSize: 22 * Theme.scale(Screen) color: sidebarPopupRect.isRecording || recordButtonArea.containsMouse ? Theme.backgroundPrimary : Theme.accentPrimary verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter @@ -321,18 +321,18 @@ PanelWithOverlay { Rectangle { id: wallpaperButton - 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: wallpaperButtonArea.containsMouse ? Theme.accentPrimary : "transparent" Text { anchors.centerIn: parent text: "image" font.family: "Material Symbols Outlined" - font.pixelSize: 22 * Theme.uiScale + font.pixelSize: 22 * Theme.scale(Screen) color: wallpaperButtonArea.containsMouse ? Theme.backgroundPrimary : Theme.accentPrimary verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter diff --git a/Widgets/SidePanel/PowerMenu.qml b/Widgets/SidePanel/PowerMenu.qml index f1c3564..ec60ed4 100644 --- a/Widgets/SidePanel/PowerMenu.qml +++ b/Widgets/SidePanel/PowerMenu.qml @@ -44,8 +44,8 @@ Rectangle { uptimeProcess.running = true; } - width: 440 * Theme.uiScale - height: 80 * Theme.uiScale + width: 440 * Theme.scale(Screen) + height: 80 * Theme.scale(Screen) color: "transparent" anchors.horizontalCenterOffset: -2 onPanelVisibleChanged: { @@ -62,29 +62,29 @@ Rectangle { anchors.fill: parent color: Theme.surface - radius: 18 * Theme.uiScale + radius: 18 * Theme.scale(Screen) ColumnLayout { anchors.fill: parent - anchors.margins: 18 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.margins: 18 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) RowLayout { Layout.fillWidth: true - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Rectangle { - width: 48 * Theme.uiScale - height: 48 * Theme.uiScale - radius: 24 * Theme.uiScale + width: 48 * Theme.scale(Screen) + height: 48 * Theme.scale(Screen) + radius: 24 * Theme.scale(Screen) color: Theme.accentPrimary Rectangle { anchors.fill: parent color: "transparent" - radius: 24 * Theme.uiScale + radius: 24 * Theme.scale(Screen) border.color: Theme.accentPrimary - border.width: 2 * Theme.uiScale + border.width: 2 * Theme.scale(Screen) z: 2 } @@ -94,13 +94,13 @@ Rectangle { } ColumnLayout { - spacing: 4 * Theme.uiScale + spacing: 4 * Theme.scale(Screen) Layout.fillWidth: true Text { text: Quickshell.env("USER") font.family: Theme.fontFamily - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } @@ -108,7 +108,7 @@ Rectangle { Text { text: "System Uptime: " + uptimeText font.family: Theme.fontFamily - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary } @@ -121,19 +121,19 @@ Rectangle { Rectangle { id: settingsButton - width: 32 * Theme.uiScale - height: 32 * Theme.uiScale - radius: 16 * Theme.uiScale + width: 32 * Theme.scale(Screen) + height: 32 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: settingsButtonArea.containsMouse || settingsButtonArea.pressed ? Theme.accentPrimary : "transparent" border.color: Theme.accentPrimary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) Text { anchors.centerIn: parent anchors.horizontalCenterOffset: -1 text: "settings" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: settingsButtonArea.containsMouse || settingsButtonArea.pressed ? Theme.backgroundPrimary : Theme.accentPrimary } @@ -162,18 +162,18 @@ Rectangle { Rectangle { id: systemButton - width: 32 * Theme.uiScale - height: 32 * Theme.uiScale - radius: 16 * Theme.uiScale + width: 32 * Theme.scale(Screen) + height: 32 * Theme.scale(Screen) + radius: 16 * Theme.scale(Screen) color: systemButtonArea.containsMouse || systemButtonArea.pressed ? Theme.accentPrimary : "transparent" border.color: Theme.accentPrimary - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) Text { anchors.centerIn: parent text: "power_settings_new" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: systemButtonArea.containsMouse || systemButtonArea.pressed ? Theme.backgroundPrimary : Theme.accentPrimary } @@ -211,18 +211,18 @@ Rectangle { anchors.right: systemButton.right Rectangle { - width: 160 * Theme.uiScale - height: 220 * Theme.uiScale + width: 160 * Theme.scale(Screen) + height: 220 * Theme.scale(Screen) color: Theme.surface - radius: 8 * Theme.uiScale + radius: 8 * Theme.scale(Screen) border.color: Theme.outline - border.width: 1 * Theme.uiScale + border.width: 1 * Theme.scale(Screen) visible: true z: 9999 anchors.top: parent.top anchors.right: parent.right - anchors.rightMargin: 32 * Theme.uiScale - anchors.topMargin: systemButton.y + systemButton.height + 48 * Theme.uiScale + anchors.rightMargin: 32 * Theme.scale(Screen) + anchors.topMargin: systemButton.y + systemButton.height + 48 * Theme.scale(Screen) // Prevent closing when clicking in the panel bg MouseArea { @@ -231,31 +231,31 @@ Rectangle { ColumnLayout { anchors.fill: parent - anchors.margins: 8 * Theme.uiScale - spacing: 4 * Theme.uiScale + anchors.margins: 8 * Theme.scale(Screen) + spacing: 4 * Theme.scale(Screen) Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 36 * Theme.uiScale - radius: 6 * Theme.uiScale + Layout.preferredHeight: 36 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: lockButtonArea.containsMouse ? Theme.accentPrimary : "transparent" RowLayout { anchors.fill: parent - anchors.margins: 12 * Theme.uiScale - spacing: 8 * Theme.uiScale + anchors.margins: 12 * Theme.scale(Screen) + spacing: 8 * Theme.scale(Screen) Text { text: "lock_outline" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: lockButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary } Text { text: "Lock Screen" font.family: Theme.fontFamily - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: lockButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary Layout.fillWidth: true } @@ -278,25 +278,25 @@ Rectangle { Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 36 * Theme.uiScale - radius: 6 * Theme.uiScale + Layout.preferredHeight: 36 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: suspendButtonArea.containsMouse ? Theme.accentPrimary : "transparent" RowLayout { anchors.fill: parent - anchors.margins: 12 * Theme.uiScale - spacing: 8 * Theme.uiScale + anchors.margins: 12 * Theme.scale(Screen) + spacing: 8 * Theme.scale(Screen) Text { text: "bedtime" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: suspendButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary } Text { text: "Suspend" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: suspendButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary Layout.fillWidth: true } @@ -319,26 +319,26 @@ Rectangle { Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 36 * Theme.uiScale - radius: 6 * Theme.uiScale + Layout.preferredHeight: 36 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: rebootButtonArea.containsMouse ? Theme.accentPrimary : "transparent" RowLayout { anchors.fill: parent - anchors.margins: 12 * Theme.uiScale - spacing: 8 * Theme.uiScale + anchors.margins: 12 * Theme.scale(Screen) + spacing: 8 * Theme.scale(Screen) Text { text: "refresh" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: rebootButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary } Text { text: "Reboot" font.family: Theme.fontFamily - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: rebootButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary Layout.fillWidth: true } @@ -361,25 +361,25 @@ Rectangle { Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 36 * Theme.uiScale - radius: 6 * Theme.uiScale + Layout.preferredHeight: 36 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: logoutButtonArea.containsMouse ? Theme.accentPrimary : "transparent" RowLayout { anchors.fill: parent - anchors.margins: 12 * Theme.uiScale - spacing: 8 * Theme.uiScale + anchors.margins: 12 * Theme.scale(Screen) + spacing: 8 * Theme.scale(Screen) Text { text: "exit_to_app" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: logoutButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary } Text { text: "Logout" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: logoutButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary Layout.fillWidth: true } @@ -402,25 +402,25 @@ Rectangle { Rectangle { Layout.fillWidth: true - Layout.preferredHeight: 36 * Theme.uiScale - radius: 6 * Theme.uiScale + Layout.preferredHeight: 36 * Theme.scale(Screen) + radius: 6 * Theme.scale(Screen) color: shutdownButtonArea.containsMouse ? Theme.accentPrimary : "transparent" RowLayout { anchors.fill: parent - anchors.margins: 12 * Theme.uiScale - spacing: 8 * Theme.uiScale + anchors.margins: 12 * Theme.scale(Screen) + spacing: 8 * Theme.scale(Screen) Text { text: "power_settings_new" font.family: "Material Symbols Outlined" - font.pixelSize: 16 * Theme.uiScale + font.pixelSize: 16 * Theme.scale(Screen) color: shutdownButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary } Text { text: "Shutdown" - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) color: shutdownButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary Layout.fillWidth: true } diff --git a/Widgets/SidePanel/PowerProfile.qml b/Widgets/SidePanel/PowerProfile.qml index 775046e..409ebac 100644 --- a/Widgets/SidePanel/PowerProfile.qml +++ b/Widgets/SidePanel/PowerProfile.qml @@ -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 diff --git a/Widgets/SidePanel/SettingsIcon.qml b/Widgets/SidePanel/SettingsIcon.qml index dc12ac2..bdae248 100644 --- a/Widgets/SidePanel/SettingsIcon.qml +++ b/Widgets/SidePanel/SettingsIcon.qml @@ -10,8 +10,8 @@ import qs.Components PanelWindow { id: settingsModal - implicitWidth: 480 * Theme.uiScale - implicitHeight: 780 * Theme.uiScale + implicitWidth: 480 * Theme.scale(Screen) + implicitHeight: 780 * Theme.scale(Screen) visible: false color: "transparent" anchors.top: true diff --git a/Widgets/SidePanel/SettingsModal.qml b/Widgets/SidePanel/SettingsModal.qml index 792f76e..5a47ecf 100644 --- a/Widgets/SidePanel/SettingsModal.qml +++ b/Widgets/SidePanel/SettingsModal.qml @@ -10,8 +10,8 @@ import qs.Components PanelWindow { id: settingsModal - implicitWidth: 480 * Theme.uiScale - implicitHeight: 780 * Theme.uiScale + implicitWidth: 480 * Theme.scale(Screen) + implicitHeight: 780 * Theme.scale(Screen) visible: false color: "transparent" anchors.top: true diff --git a/Widgets/SidePanel/SystemMonitor.qml b/Widgets/SidePanel/SystemMonitor.qml index 59fc877..dd0464a 100644 --- a/Widgets/SidePanel/SystemMonitor.qml +++ b/Widgets/SidePanel/SystemMonitor.qml @@ -8,8 +8,8 @@ import qs.Settings Rectangle { id: systemMonitor - width: 70 * Theme.uiScale - height: 250 * Theme.uiScale + width: 70 * Theme.scale(Screen) + height: 250 * Theme.scale(Screen) color: "transparent" // Track visibility state for panel integration @@ -19,26 +19,26 @@ Rectangle { id: card anchors.fill: parent color: Theme.surface - radius: 18 * Theme.uiScale + radius: 18 * Theme.scale(Screen) ColumnLayout { anchors.fill: parent - anchors.margins: 8 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.margins: 8 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) Layout.alignment: Qt.AlignVCenter // CPU usage indicator with circular progress bar Item { - width: 50 * Theme.uiScale; height: 50 * Theme.uiScale + width: 50 * Theme.scale(Screen); height: 50 * Theme.scale(Screen) CircularProgressBar { id: cpuBar progress: Sysinfo.cpuUsage / 100 - size: 50 * Theme.uiScale - strokeWidth: 4 * Theme.uiScale + size: 50 * Theme.scale(Screen) + strokeWidth: 4 * Theme.scale(Screen) hasNotch: true notchIcon: "speed" - notchIconSize: 14 * Theme.uiScale + notchIconSize: 14 * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter } MouseArea { @@ -60,16 +60,16 @@ Rectangle { // CPU temperature indicator with circular progress bar Item { - width: 50 * Theme.uiScale; height: 50 * Theme.uiScale + width: 50 * Theme.scale(Screen); height: 50 * Theme.scale(Screen) CircularProgressBar { id: tempBar progress: Sysinfo.cpuTemp / 100 - size: 50 * Theme.uiScale - strokeWidth: 4 * Theme.uiScale + size: 50 * Theme.scale(Screen) + strokeWidth: 4 * Theme.scale(Screen) hasNotch: true units: "°C" notchIcon: "thermometer" - notchIconSize: 14 * Theme.uiScale + notchIconSize: 14 * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter } MouseArea { @@ -91,15 +91,15 @@ Rectangle { // Memory usage indicator with circular progress bar Item { - width: 50 * Theme.uiScale; height: 50 * Theme.uiScale + width: 50 * Theme.scale(Screen); height: 50 * Theme.scale(Screen) CircularProgressBar { id: memBar progress: Sysinfo.memoryUsagePer / 100 - size: 50 * Theme.uiScale - strokeWidth: 4 * Theme.uiScale + size: 50 * Theme.scale(Screen) + strokeWidth: 4 * Theme.scale(Screen) hasNotch: true notchIcon: "memory" - notchIconSize: 14 * Theme.uiScale + notchIconSize: 14 * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter } MouseArea { @@ -121,15 +121,15 @@ Rectangle { // Disk usage indicator with circular progress bar Item { - width: 50 * Theme.uiScale; height: 50 * Theme.uiScale + width: 50 * Theme.scale(Screen); height: 50 * Theme.scale(Screen) CircularProgressBar { id: diskBar progress: Sysinfo.diskUsage / 100 - size: 50 * Theme.uiScale - strokeWidth: 4 * Theme.uiScale + size: 50 * Theme.scale(Screen) + strokeWidth: 4 * Theme.scale(Screen) hasNotch: true notchIcon: "storage" - notchIconSize: 14 * Theme.uiScale + notchIconSize: 14 * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter } MouseArea { diff --git a/Widgets/SidePanel/Weather.qml b/Widgets/SidePanel/Weather.qml index 1c77192..3927e93 100644 --- a/Widgets/SidePanel/Weather.qml +++ b/Widgets/SidePanel/Weather.qml @@ -6,8 +6,8 @@ import "../../Helpers/Weather.js" as WeatherHelper Rectangle { id: weatherRoot - width: 440 * Theme.uiScale - height: 180 * Theme.uiScale + width: 440 * Theme.scale(Screen) + height: 180 * Theme.scale(Screen) color: "transparent" anchors.horizontalCenterOffset: -2 @@ -83,29 +83,29 @@ Rectangle { id: card anchors.fill: parent color: Theme.surface - radius: 18 * Theme.uiScale + radius: 18 * Theme.scale(Screen) ColumnLayout { anchors.fill: parent - anchors.margins: 18 * Theme.uiScale - spacing: 12 * Theme.uiScale + anchors.margins: 18 * Theme.scale(Screen) + spacing: 12 * Theme.scale(Screen) RowLayout { - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Layout.fillWidth: true RowLayout { - spacing: 12 * Theme.uiScale - Layout.preferredWidth: 140 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) + Layout.preferredWidth: 140 * Theme.scale(Screen) Text { id: weatherIcon text: isLoading ? "sync" : (weatherData && weatherData.current_weather ? materialSymbolForCode(weatherData.current_weather.weathercode) : "cloud") font.family: "Material Symbols Outlined" - font.pixelSize: 28 * Theme.uiScale + font.pixelSize: 28 * Theme.scale(Screen) verticalAlignment: Text.AlignVCenter color: isLoading ? Theme.accentPrimary : Theme.accentPrimary Layout.alignment: Qt.AlignVCenter @@ -121,28 +121,28 @@ Rectangle { } ColumnLayout { - spacing: 2 * Theme.uiScale + spacing: 2 * Theme.scale(Screen) RowLayout { - spacing: 4 * Theme.uiScale + spacing: 4 * Theme.scale(Screen) Text { text: city font.family: Theme.fontFamily - font.pixelSize: 14 * Theme.uiScale + font.pixelSize: 14 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } Text { text: weatherData && weatherData.timezone_abbreviation ? `(${weatherData.timezone_abbreviation})` : "" font.family: Theme.fontFamily - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) color: Theme.textSecondary - leftPadding: 2 * Theme.uiScale + leftPadding: 2 * Theme.scale(Screen) } } Text { text: weatherData && weatherData.current_weather ? ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? `${Math.round(weatherData.current_weather.temperature * 9/5 + 32)}°F` : `${Math.round(weatherData.current_weather.temperature)}°C`) : ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? "--°F" : "--°C") font.family: Theme.fontFamily - font.pixelSize: 24 * Theme.uiScale + font.pixelSize: 24 * Theme.scale(Screen) font.bold: true color: Theme.textPrimary } @@ -157,16 +157,16 @@ Rectangle { Rectangle { width: parent.width - height: 1 * Theme.uiScale + height: 1 * Theme.scale(Screen) color: Qt.rgba(Theme.textSecondary.g, Theme.textSecondary.g, Theme.textSecondary.b, 0.12) Layout.fillWidth: true - Layout.topMargin: 2 * Theme.uiScale - Layout.bottomMargin: 2 * Theme.uiScale + Layout.topMargin: 2 * Theme.scale(Screen) + Layout.bottomMargin: 2 * Theme.scale(Screen) } RowLayout { - spacing: 12 * Theme.uiScale + spacing: 12 * Theme.scale(Screen) Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter visible: weatherData && weatherData.daily && weatherData.daily.time @@ -174,13 +174,13 @@ Rectangle { Repeater { model: weatherData && weatherData.daily && weatherData.daily.time ? 5 : 0 delegate: ColumnLayout { - spacing: 2 * Theme.uiScale + spacing: 2 * Theme.scale(Screen) Layout.alignment: Qt.AlignHCenter Text { text: Qt.formatDateTime(new Date(weatherData.daily.time[index]), "ddd") font.family: Theme.fontFamily - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textSecondary horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter @@ -189,7 +189,7 @@ Rectangle { text: materialSymbolForCode(weatherData.daily.weathercode[index]) font.family: "Material Symbols Outlined" - font.pixelSize: 22 * Theme.uiScale + font.pixelSize: 22 * Theme.scale(Screen) color: Theme.accentPrimary horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter @@ -198,7 +198,7 @@ Rectangle { text: weatherData && weatherData.daily ? ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? `${Math.round(weatherData.daily.temperature_2m_max[index] * 9/5 + 32)}° / ${Math.round(weatherData.daily.temperature_2m_min[index] * 9/5 + 32)}°` : `${Math.round(weatherData.daily.temperature_2m_max[index])}° / ${Math.round(weatherData.daily.temperature_2m_min[index])}°`) : ((Settings.settings.useFahrenheit !== undefined ? Settings.settings.useFahrenheit : false) ? "--° / --°" : "--° / --°") font.family: Theme.fontFamily - font.pixelSize: 12 * Theme.uiScale + font.pixelSize: 12 * Theme.scale(Screen) color: Theme.textPrimary horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter @@ -213,7 +213,7 @@ Rectangle { color: Theme.error visible: errorString !== "" font.family: Theme.fontFamily - font.pixelSize: 10 * Theme.uiScale + font.pixelSize: 10 * Theme.scale(Screen) horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter }