diff --git a/quickshell/Common/StockThemes.js b/quickshell/Common/StockThemes.js index 154b224c2..0a21afa57 100644 --- a/quickshell/Common/StockThemes.js +++ b/quickshell/Common/StockThemes.js @@ -17,6 +17,8 @@ const StockThemes = { background: "#101418", backgroundText: "#e0e2e8", outline: "#8c9199", + surfaceContainerLowest: "#0c1014", + surfaceContainerLow: "#191c20", surfaceContainer: "#1d2024", surfaceContainerHigh: "#272a2f", surfaceContainerHighest: "#32353a", @@ -35,6 +37,8 @@ const StockThemes = { background: "#141218", backgroundText: "#e6e0e9", outline: "#948f99", + surfaceContainerLowest: "#100e14", + surfaceContainerLow: "#1d1b20", surfaceContainer: "#211f24", surfaceContainerHigh: "#2b292f", surfaceContainerHighest: "#36343a", @@ -53,6 +57,8 @@ const StockThemes = { background: "#10140f", backgroundText: "#e0e4db", outline: "#8c9388", + surfaceContainerLowest: "#0c100b", + surfaceContainerLow: "#191d17", surfaceContainer: "#1d211b", surfaceContainerHigh: "#272b25", surfaceContainerHighest: "#323630", @@ -71,6 +77,8 @@ const StockThemes = { background: "#1a120e", backgroundText: "#f0dfd8", outline: "#a08d85", + surfaceContainerLowest: "#160e0a", + surfaceContainerLow: "#231a16", surfaceContainer: "#271e1a", surfaceContainerHigh: "#322824", surfaceContainerHighest: "#3d332e", @@ -89,6 +97,8 @@ const StockThemes = { background: "#1a1110", backgroundText: "#f1dedc", outline: "#a08c89", + surfaceContainerLowest: "#160d0c", + surfaceContainerLow: "#231918", surfaceContainer: "#271d1c", surfaceContainerHigh: "#322826", surfaceContainerHighest: "#3d3231", @@ -107,6 +117,8 @@ const StockThemes = { background: "#0e1416", backgroundText: "#dee3e5", outline: "#899295", + surfaceContainerLowest: "#0a1012", + surfaceContainerLow: "#171d1e", surfaceContainer: "#1b2122", surfaceContainerHigh: "#252b2c", surfaceContainerHighest: "#303637", @@ -125,6 +137,8 @@ const StockThemes = { background: "#191112", backgroundText: "#f0dee0", outline: "#9f8c8e", + surfaceContainerLowest: "#150d0e", + surfaceContainerLow: "#22191a", surfaceContainer: "#261d1e", surfaceContainerHigh: "#312829", surfaceContainerHighest: "#3c3233", @@ -143,6 +157,8 @@ const StockThemes = { background: "#17130b", backgroundText: "#ebe1d4", outline: "#998f80", + surfaceContainerLowest: "#130f07", + surfaceContainerLow: "#1f1b13", surfaceContainer: "#231f17", surfaceContainerHigh: "#2e2921", surfaceContainerHighest: "#39342b", @@ -161,6 +177,8 @@ const StockThemes = { background: "#1a1110", backgroundText: "#f1dedc", outline: "#a08c8a", + surfaceContainerLowest: "#160d0c", + surfaceContainerLow: "#231918", surfaceContainer: "#271d1c", surfaceContainerHigh: "#322826", surfaceContainerHighest: "#3d3231", @@ -179,6 +197,8 @@ const StockThemes = { background: "#131315", backgroundText: "#e4e2e3", outline: "#929092", + surfaceContainerLowest: "#252525", + surfaceContainerLow: "#303030", surfaceContainer: "#353535", surfaceContainerHigh: "#424242", surfaceContainerHighest: "#505050", @@ -203,6 +223,8 @@ const StockThemes = { background: "#f7f9ff", backgroundText: "#181c20", outline: "#72777f", + surfaceContainerLowest: "#f9fbff", + surfaceContainerLow: "#eef0f6", surfaceContainer: "#eceef4", surfaceContainerHigh: "#e6e8ee", surfaceContainerHighest: "#e0e2e8", @@ -221,6 +243,8 @@ const StockThemes = { background: "#fef7ff", backgroundText: "#1d1b20", outline: "#7a757f", + surfaceContainerLowest: "#fff9ff", + surfaceContainerLow: "#f4eef6", surfaceContainer: "#f2ecf4", surfaceContainerHigh: "#ece6ee", surfaceContainerHighest: "#e6e0e9", @@ -239,6 +263,8 @@ const StockThemes = { background: "#f7fbf1", backgroundText: "#191d17", outline: "#72796f", + surfaceContainerLowest: "#f9fdf3", + surfaceContainerLow: "#eef1e8", surfaceContainer: "#ecefe6", surfaceContainerHigh: "#e6e9e0", surfaceContainerHighest: "#e0e4db", @@ -257,6 +283,8 @@ const StockThemes = { background: "#fff8f6", backgroundText: "#221a16", outline: "#85736c", + surfaceContainerLowest: "#fffaf8", + surfaceContainerLow: "#feece5", surfaceContainer: "#fceae3", surfaceContainerHigh: "#f6e5de", surfaceContainerHighest: "#f0dfd8", @@ -275,6 +303,8 @@ const StockThemes = { background: "#fff8f7", backgroundText: "#231918", outline: "#857370", + surfaceContainerLowest: "#fffaf9", + surfaceContainerLow: "#feece9", surfaceContainer: "#fceae7", surfaceContainerHigh: "#f7e4e1", surfaceContainerHighest: "#f1dedc", @@ -293,6 +323,8 @@ const StockThemes = { background: "#f5fafc", backgroundText: "#171d1e", outline: "#6f797b", + surfaceContainerLowest: "#f7fcfe", + surfaceContainerLow: "#ebf1f2", surfaceContainer: "#e9eff0", surfaceContainerHigh: "#e3e9eb", surfaceContainerHighest: "#dee3e5", @@ -311,6 +343,8 @@ const StockThemes = { background: "#fff8f7", backgroundText: "#22191a", outline: "#847375", + surfaceContainerLowest: "#fffaf9", + surfaceContainerLow: "#fdeced", surfaceContainer: "#fbeaeb", surfaceContainerHigh: "#f5e4e5", surfaceContainerHighest: "#f0dee0", @@ -329,6 +363,8 @@ const StockThemes = { background: "#fff8f2", backgroundText: "#1f1b13", outline: "#7f7667", + surfaceContainerLowest: "#fffaf4", + surfaceContainerLow: "#f8eee1", surfaceContainer: "#f6ecdf", surfaceContainerHigh: "#f1e7d9", surfaceContainerHighest: "#ebe1d4", @@ -347,6 +383,8 @@ const StockThemes = { background: "#fff8f7", backgroundText: "#231918", outline: "#857371", + surfaceContainerLowest: "#fffaf9", + surfaceContainerLow: "#feece9", surfaceContainer: "#fceae7", surfaceContainerHigh: "#f6e4e2", surfaceContainerHighest: "#f1dedc", @@ -365,6 +403,8 @@ const StockThemes = { background: "#ffffff", backgroundText: "#1a1a1a", outline: "#757577", + surfaceContainerLowest: "#fafafb", + surfaceContainerLow: "#ededef", surfaceContainer: "#e8e8ea", surfaceContainerHigh: "#dcdcde", surfaceContainerHighest: "#d0d0d2", diff --git a/quickshell/Common/Theme.qml b/quickshell/Common/Theme.qml index 29595d503..f0f70b2c5 100644 --- a/quickshell/Common/Theme.qml +++ b/quickshell/Common/Theme.qml @@ -463,6 +463,8 @@ Singleton { "background": getMatugenColor("background", "#1a1c1e"), "backgroundText": getMatugenColor("on_background", "#e3e8ef"), "outline": getMatugenColor("outline", "#8e918f"), + "surfaceContainerLowest": getMatugenColor("surface_container_lowest", "#0e1013"), + "surfaceContainerLow": getMatugenColor("surface_container_low", "#181a1d"), "surfaceContainer": getMatugenColor("surface_container", "#1e2023"), "surfaceContainerHigh": getMatugenColor("surface_container_high", "#292b2f"), "surfaceContainerHighest": getMatugenColor("surface_container_highest", "#343740"), @@ -535,7 +537,9 @@ Singleton { property color background: currentThemeData.background property color backgroundText: currentThemeData.backgroundText property color outline: currentThemeData.outline - property color outlineVariant: currentThemeData.outlineVariant || Qt.rgba(outline.r, outline.g, outline.b, 0.6) + property color outlineVariant: currentThemeData.outlineVariant || withAlpha(outline, 0.6) + property color surfaceContainerLowest: currentThemeData.surfaceContainerLowest || blend(surfaceContainer, surface, 1.2) + property color surfaceContainerLow: currentThemeData.surfaceContainerLow || blend(surface, surfaceContainer, 0.667) property color surfaceContainer: currentThemeData.surfaceContainer property color surfaceContainerHigh: currentThemeData.surfaceContainerHigh property color surfaceContainerHighest: currentThemeData.surfaceContainerHighest || surfaceContainerHigh @@ -546,9 +550,9 @@ Singleton { property color onSurface: surfaceText property color onSurfaceVariant: surfaceVariantText property color onPrimary: primaryText - property color onSurface_12: Qt.rgba(onSurface.r, onSurface.g, onSurface.b, 0.12) - property color onSurface_38: Qt.rgba(onSurface.r, onSurface.g, onSurface.b, 0.38) - property color onSurfaceVariant_30: Qt.rgba(onSurfaceVariant.r, onSurfaceVariant.g, onSurfaceVariant.b, 0.30) + property color onSurface_12: withAlpha(onSurface, 0.12) + property color onSurface_38: withAlpha(onSurface, 0.38) + property color onSurfaceVariant_30: withAlpha(onSurfaceVariant, 0.30) property color error: currentThemeData.error || "#F2B8B5" property color warning: currentThemeData.warning || "#FF9800" @@ -557,32 +561,32 @@ Singleton { property color tempDanger: "#ff5555" property color success: currentThemeData.success || "#4CAF50" - property color primaryHover: Qt.rgba(primary.r, primary.g, primary.b, 0.12) - property color primaryHoverLight: Qt.rgba(primary.r, primary.g, primary.b, transparentBlurLayers ? 0.12 : 0.08) - property color primaryPressed: Qt.rgba(primary.r, primary.g, primary.b, transparentBlurLayers ? 0.24 : 0.16) - property color primarySelected: Qt.rgba(primary.r, primary.g, primary.b, 0.3) - property color primaryBackground: Qt.rgba(primary.r, primary.g, primary.b, 0.04) + property color primaryHover: withAlpha(primary, 0.12) + property color primaryHoverLight: withAlpha(primary, transparentBlurLayers ? 0.12 : 0.08) + property color primaryPressed: withAlpha(primary, transparentBlurLayers ? 0.24 : 0.16) + property color primarySelected: withAlpha(primary, 0.3) + property color primaryBackground: withAlpha(primary, 0.04) - property color secondaryHover: Qt.rgba(secondary.r, secondary.g, secondary.b, 0.08) + property color secondaryHover: withAlpha(secondary, 0.08) - property color surfaceHover: Qt.rgba(surfaceVariant.r, surfaceVariant.g, surfaceVariant.b, 0.08) - property color surfacePressed: Qt.rgba(surfaceVariant.r, surfaceVariant.g, surfaceVariant.b, 0.12) - property color surfaceSelected: Qt.rgba(surfaceVariant.r, surfaceVariant.g, surfaceVariant.b, 0.15) - property color surfaceLight: Qt.rgba(surfaceVariant.r, surfaceVariant.g, surfaceVariant.b, transparentBlurLayers ? 0.3 : 0.1) - property color surfaceVariantAlpha: Qt.rgba(surfaceVariant.r, surfaceVariant.g, surfaceVariant.b, 0.2) + property color surfaceHover: withAlpha(surfaceVariant, 0.08) + property color surfacePressed: withAlpha(surfaceVariant, 0.12) + property color surfaceSelected: withAlpha(surfaceVariant, 0.15) + property color surfaceLight: withAlpha(surfaceVariant, transparentBlurLayers ? 0.3 : 0.1) + property color surfaceVariantAlpha: withAlpha(surfaceVariant, 0.2) readonly property bool blurForegroundLayers: BlurService.enabled && (typeof SettingsData === "undefined" || (SettingsData.blurForegroundLayers ?? true)) readonly property bool transparentBlurLayers: BlurService.enabled && !blurForegroundLayers readonly property color readableSurface: withAlpha(surfaceContainer, popupTransparency) readonly property color readableSurfaceHigh: withAlpha(surfaceContainerHigh, popupTransparency) - readonly property color floatingSurface: transparentBlurLayers ? "transparent" : readableSurface - readonly property color floatingSurfaceHigh: transparentBlurLayers ? "transparent" : readableSurfaceHigh + readonly property color floatingSurface: transparentBlurLayers ? withAlpha(readableSurface, 0) : readableSurface + readonly property color floatingSurfaceHigh: transparentBlurLayers ? withAlpha(readableSurfaceHigh, 0) : readableSurfaceHigh readonly property color nestedSurface: floatingSurfaceHigh readonly property real blurLayerOutlineOpacity: Math.max(0, Math.min(1, typeof SettingsData === "undefined" ? 0.12 : (SettingsData.blurLayerOutlineOpacity ?? 0.12))) readonly property real layerOutlineOpacity: BlurService.enabled ? blurLayerOutlineOpacity : 0.08 readonly property int layerOutlineWidth: BlurService.enabled && layerOutlineOpacity > 0 ? 1 : 0 - property color surfaceTextHover: Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.08) - property color surfaceTextAlpha: Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.3) + property color surfaceTextHover: withAlpha(surfaceText, 0.08) + property color surfaceTextAlpha: withAlpha(surfaceText, 0.3) function roleColor(mode) { switch (mode) { @@ -607,6 +611,10 @@ Singleton { return surfaceVariant; case "s": return surface; + case "scll": + return surfaceContainerLowest; + case "scl": + return surfaceContainerLow; case "sc": return surfaceContainer; case "sch": @@ -619,19 +627,23 @@ Singleton { case "err": return error; default: - return "transparent"; + return withAlpha(surface, 0); } } - property color surfaceTextLight: Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.06) - property color surfaceTextMedium: Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.7) + property color surfaceTextLight: withAlpha(surfaceText, 0.06) + property color surfaceTextSecondary: withAlpha(surfaceText, 0.6) + property color surfaceTextMedium: withAlpha(surfaceText, 0.7) - property color outlineButton: Qt.rgba(outline.r, outline.g, outline.b, 0.5) - property color outlineLight: Qt.rgba(outline.r, outline.g, outline.b, BlurService.enabled ? Math.min(1, layerOutlineOpacity * 0.625) : 0.05) - property color outlineMedium: Qt.rgba(outline.r, outline.g, outline.b, layerOutlineOpacity) - property color outlineStrong: Qt.rgba(outline.r, outline.g, outline.b, BlurService.enabled ? Math.min(1, layerOutlineOpacity * 1.5) : 0.12) + property color outlineButton: withAlpha(outline, 0.5) + property color outlineLight: withAlpha(outline, BlurService.enabled ? Math.min(1, layerOutlineOpacity * 0.625) : 0.05) + property color outlineMedium: withAlpha(outline, layerOutlineOpacity) + property color outlineStrong: withAlpha(outline, BlurService.enabled ? Math.min(1, layerOutlineOpacity * 1.5) : 0.12) + property color outlineHeavy: withAlpha(outline, 0.2) - property color errorHover: Qt.rgba(error.r, error.g, error.b, 0.12) - property color errorPressed: Qt.rgba(error.r, error.g, error.b, 0.16) + property color errorHover: withAlpha(error, 0.12) + property color errorPressed: withAlpha(error, 0.16) + property color errorSelected: withAlpha(error, 0.3) + property color warningHover: withAlpha(warning, 0.12) readonly property color ccTileActiveBg: { switch (SettingsData.controlCenterTileColorMode) { @@ -681,13 +693,13 @@ Singleton { readonly property color ccTileRing: { switch (SettingsData.controlCenterTileColorMode) { case "primaryContainer": - return Qt.rgba(primary.r, primary.g, primary.b, 0.22); + return withAlpha(primary, 0.22); case "secondary": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.22); + return withAlpha(surfaceText, 0.22); case "surfaceVariant": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.22); + return withAlpha(surfaceText, 0.22); default: - return Qt.rgba(primaryText.r, primaryText.g, primaryText.b, 0.22); + return withAlpha(primaryText, 0.22); } } @@ -720,11 +732,11 @@ Singleton { readonly property color buttonHover: { switch (SettingsData.buttonColorMode) { case "primaryContainer": - return Qt.rgba(primary.r, primary.g, primary.b, 0.12); + return withAlpha(primary, 0.12); case "secondary": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.12); + return withAlpha(surfaceText, 0.12); case "surfaceVariant": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.12); + return withAlpha(surfaceText, 0.12); default: return primaryHover; } @@ -733,11 +745,11 @@ Singleton { readonly property color buttonPressed: { switch (SettingsData.buttonColorMode) { case "primaryContainer": - return Qt.rgba(primary.r, primary.g, primary.b, 0.16); + return withAlpha(primary, 0.16); case "secondary": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.16); + return withAlpha(surfaceText, 0.16); case "surfaceVariant": - return Qt.rgba(surfaceText.r, surfaceText.g, surfaceText.b, 0.16); + return withAlpha(surfaceText, 0.16); default: return primaryPressed; } @@ -1068,7 +1080,7 @@ Singleton { readonly property color connectedSurfaceColor: { if (typeof SettingsData === "undefined") return withAlpha(surfaceContainer, popupTransparency); - return isConnectedEffect ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : withAlpha(surfaceContainer, popupTransparency); + return isConnectedEffect ? withAlpha(SettingsData.effectiveFrameColor, SettingsData.frameOpacity) : withAlpha(surfaceContainer, popupTransparency); } readonly property real connectedSurfaceRadius: isConnectedEffect ? connectedCornerRadius : cornerRadius readonly property bool connectedSurfaceBlurEnabled: (typeof SettingsData === "undefined") ? true : (!isConnectedEffect || SettingsData.frameBlurEnabled) @@ -1468,7 +1480,7 @@ Singleton { property string currentThemeName: currentTheme function panelBackground() { - return Qt.rgba(surfaceContainer.r, surfaceContainer.g, surfaceContainer.b, panelTransparency); + return withAlpha(surfaceContainer, panelTransparency); } property real notepadTransparency: SettingsData.notepadTransparencyOverride >= 0 ? SettingsData.notepadTransparencyOverride : popupTransparency @@ -1978,6 +1990,8 @@ Singleton { } function withAlpha(c, a) { + if (!c || c.r === undefined) + return Qt.rgba(0, 0, 0, 0); return Qt.rgba(c.r, c.g, c.b, a); } @@ -1988,6 +2002,8 @@ Singleton { } function blendAlpha(c, a) { + if (!c || c.r === undefined) + return Qt.rgba(0, 0, 0, 0); return Qt.rgba(c.r, c.g, c.b, c.a * a); } diff --git a/quickshell/Modals/AppPickerModal.qml b/quickshell/Modals/AppPickerModal.qml index 899f0c851..598fe164e 100644 --- a/quickshell/Modals/AppPickerModal.qml +++ b/quickshell/Modals/AppPickerModal.qml @@ -264,7 +264,7 @@ DankModal { iconName: "view_list" iconSize: 20 iconColor: root.viewMode === "list" ? Theme.primary : Theme.surfaceText - backgroundColor: root.viewMode === "list" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + backgroundColor: root.viewMode === "list" ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) onClicked: { root.viewMode = "list"; } @@ -276,7 +276,7 @@ DankModal { iconName: "grid_view" iconSize: 20 iconColor: root.viewMode === "grid" ? Theme.primary : Theme.surfaceText - backgroundColor: root.viewMode === "grid" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + backgroundColor: root.viewMode === "grid" ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) onClicked: { root.viewMode = "grid"; } diff --git a/quickshell/Modals/BluetoothPairingModal.qml b/quickshell/Modals/BluetoothPairingModal.qml index 054d1f9a8..9a5ea41d2 100644 --- a/quickshell/Modals/BluetoothPairingModal.qml +++ b/quickshell/Modals/BluetoothPairingModal.qml @@ -256,7 +256,7 @@ DankModal { width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: cancelArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modals/Clipboard/ClipboardContent.qml b/quickshell/Modals/Clipboard/ClipboardContent.qml index 0f37def5f..691917b09 100644 --- a/quickshell/Modals/Clipboard/ClipboardContent.qml +++ b/quickshell/Modals/Clipboard/ClipboardContent.qml @@ -147,7 +147,7 @@ Item { anchors.verticalCenter: parent.verticalCenter iconName: "filter_list" iconColor: modal.activeFilter !== "all" ? Theme.primary : Theme.surfaceText - backgroundColor: modal.activeFilter !== "all" ? Theme.primarySelected : "transparent" + backgroundColor: modal.activeFilter !== "all" ? Theme.primarySelected : Theme.withAlpha(Theme.primarySelected, 0) tooltipText: I18n.tr("Filter by type", "Clipboard history type filter button tooltip") onClicked: filterMenuLoader.item?.openDropdownMenu() } diff --git a/quickshell/Modals/Clipboard/ClipboardContextMenu.qml b/quickshell/Modals/Clipboard/ClipboardContextMenu.qml index 8082fd0f4..a67adb669 100644 --- a/quickshell/Modals/Clipboard/ClipboardContextMenu.qml +++ b/quickshell/Modals/Clipboard/ClipboardContextMenu.qml @@ -121,12 +121,12 @@ Item { const hostX = host?.alignedX; const hostY = host?.renderedAlignedY ?? host?.alignedY; const globalPos = (!isNaN(hostX) && !isNaN(hostY)) ? ({ - x: screenX + hostX + x, - y: screenY + hostY + y - }) : (parentHandler ? parentHandler.mapToGlobal(x, y) : ({ - x: screenX + x, - y: screenY + y - })); + x: screenX + hostX + x, + y: screenY + hostY + y + }) : (parentHandler ? parentHandler.mapToGlobal(x, y) : ({ + x: screenX + x, + y: screenY + y + })); targetScreen = screenRef; anchorX = globalPos.x - screenX + 4; @@ -258,7 +258,7 @@ Item { height: root.effectiveMenuHeight color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: root.openState ? 1 : 0 @@ -321,7 +321,7 @@ Item { anchors.centerIn: parent width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } } @@ -330,7 +330,7 @@ Item { width: parent.width height: parent.height radius: Theme.cornerRadius - color: itemMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: itemMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.left: parent.left diff --git a/quickshell/Modals/Clipboard/ClipboardEditor.qml b/quickshell/Modals/Clipboard/ClipboardEditor.qml index 10f87e570..d32bb3ce4 100644 --- a/quickshell/Modals/Clipboard/ClipboardEditor.qml +++ b/quickshell/Modals/Clipboard/ClipboardEditor.qml @@ -419,7 +419,7 @@ Item { implicitWidth: saveMenuRow.implicitWidth + Theme.spacingS * 2 implicitHeight: saveMenuRow.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius - color: saveMenuSaveArea.containsMouse ? Theme.surfaceVariant : "transparent" + color: saveMenuSaveArea.containsMouse ? Theme.surfaceVariant : Theme.withAlpha(Theme.surfaceVariant, 0) Row { id: saveMenuRow @@ -457,7 +457,7 @@ Item { implicitWidth: saveMenuCloseRow.implicitWidth + Theme.spacingS * 2 implicitHeight: saveMenuCloseRow.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius - color: saveMenuCloseArea.containsMouse ? Theme.surfaceVariant : "transparent" + color: saveMenuCloseArea.containsMouse ? Theme.surfaceVariant : Theme.withAlpha(Theme.surfaceVariant, 0) Row { id: saveMenuCloseRow @@ -495,7 +495,7 @@ Item { implicitWidth: saveMenuPasteRow.implicitWidth + Theme.spacingS * 2 implicitHeight: saveMenuPasteRow.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius - color: saveMenuPasteArea.containsMouse ? Theme.surfaceVariant : "transparent" + color: saveMenuPasteArea.containsMouse ? Theme.surfaceVariant : Theme.withAlpha(Theme.surfaceVariant, 0) opacity: modal.wtypeAvailable ? 1 : 0.5 Row { diff --git a/quickshell/Modals/Clipboard/ClipboardEntry.qml b/quickshell/Modals/Clipboard/ClipboardEntry.qml index 6246f5ed4..e6691f19b 100644 --- a/quickshell/Modals/Clipboard/ClipboardEntry.qml +++ b/quickshell/Modals/Clipboard/ClipboardEntry.qml @@ -110,7 +110,7 @@ Rectangle { iconName: "push_pin" iconSize: Theme.iconSize - 6 iconColor: (entry.pinned || hasPinnedDuplicate) ? Theme.primary : Theme.surfaceText - backgroundColor: (entry.pinned || hasPinnedDuplicate) ? Theme.primarySelected : "transparent" + backgroundColor: (entry.pinned || hasPinnedDuplicate) ? Theme.primarySelected : Theme.withAlpha(Theme.primarySelected, 0) visible: root.showPinAction onClicked: { if (entry.pinned) { @@ -228,9 +228,9 @@ Rectangle { } onClicked: { if (SettingsData.clipboardClickToPaste) { - pasteRequested() + pasteRequested(); } else { - copyRequested() + copyRequested(); } } } diff --git a/quickshell/Modals/Clipboard/ClipboardHeader.qml b/quickshell/Modals/Clipboard/ClipboardHeader.qml index 4d38e3f5f..ac2c6e9c7 100644 --- a/quickshell/Modals/Clipboard/ClipboardHeader.qml +++ b/quickshell/Modals/Clipboard/ClipboardHeader.qml @@ -38,7 +38,6 @@ Item { font.weight: Font.Medium anchors.verticalCenter: parent.verticalCenter } - } Row { @@ -50,7 +49,7 @@ Item { iconName: "push_pin" iconSize: Theme.iconSize - 4 iconColor: header.activeTab === "saved" ? Theme.primary : Theme.surfaceText - backgroundColor: header.activeTab === "saved" ? Theme.primarySelected : "transparent" + backgroundColor: header.activeTab === "saved" ? Theme.primarySelected : Theme.withAlpha(Theme.primarySelected, 0) visible: header.pinnedCount > 0 || header.activeTab === "saved" tooltipText: header.activeTab === "saved" ? I18n.tr("Recent") : I18n.tr("Saved") onClicked: tabChanged(header.activeTab === "saved" ? "recents" : "saved") diff --git a/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml b/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml index a637d1e6f..4f901a578 100644 --- a/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml +++ b/quickshell/Modals/Clipboard/ClipboardKeyboardHints.qml @@ -15,7 +15,7 @@ Rectangle { height: ClipboardConstants.keyboardHintsHeight radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) + color: Theme.withAlpha(Theme.surfaceContainer, 0.95) border.color: Theme.primary border.width: 2 opacity: visible ? 1 : 0 diff --git a/quickshell/Modals/Common/ConfirmModal.qml b/quickshell/Modals/Common/ConfirmModal.qml index fc3075364..78a603968 100644 --- a/quickshell/Modals/Common/ConfirmModal.qml +++ b/quickshell/Modals/Common/ConfirmModal.qml @@ -211,14 +211,14 @@ DankModal { radius: Theme.cornerRadius color: { if (keyboardNavigation && selectedButton === 0) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; } else if (cancelButton.containsMouse) { return Theme.surfacePressed; } else { return Theme.surfaceVariantAlpha; } } - border.color: (keyboardNavigation && selectedButton === 0) ? Theme.primary : "transparent" + border.color: (keyboardNavigation && selectedButton === 0) ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: (keyboardNavigation && selectedButton === 0) ? 1 : 0 StyledText { @@ -249,14 +249,14 @@ DankModal { color: { const baseColor = confirmButtonColor; if (keyboardNavigation && selectedButton === 1) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, 1); + return Theme.withAlpha(baseColor, 1); } else if (confirmButton.containsMouse) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, 0.9); + return Theme.withAlpha(baseColor, 0.9); } else { return baseColor; } } - border.color: (keyboardNavigation && selectedButton === 1) ? "white" : "transparent" + border.color: (keyboardNavigation && selectedButton === 1) ? "white" : Qt.rgba(1, 1, 1, 0) border.width: (keyboardNavigation && selectedButton === 1) ? 1 : 0 StyledText { diff --git a/quickshell/Modals/Common/DankModalConnected.qml b/quickshell/Modals/Common/DankModalConnected.qml index de300e941..d6bbb0800 100644 --- a/quickshell/Modals/Common/DankModalConnected.qml +++ b/quickshell/Modals/Common/DankModalConnected.qml @@ -69,7 +69,7 @@ Item { property real cornerRadius: Theme.cornerRadius readonly property bool connectedSurfaceOverride: frameOwnsConnectedChrome readonly property color effectiveBackgroundColor: connectedSurfaceOverride ? Theme.connectedSurfaceColor : backgroundColor - readonly property color effectiveBorderColor: connectedSurfaceOverride ? "transparent" : borderColor + readonly property color effectiveBorderColor: connectedSurfaceOverride ? Theme.withAlpha(borderColor, 0) : borderColor readonly property real effectiveBorderWidth: connectedSurfaceOverride ? 0 : borderWidth readonly property real effectiveCornerRadius: connectedSurfaceOverride ? Theme.connectedSurfaceRadius : cornerRadius readonly property bool effectiveBlurEnabled: Theme.connectedSurfaceBlurEnabled @@ -659,8 +659,8 @@ Item { level: root.shadowLevel fallbackOffset: root.shadowFallbackOffset targetRadius: root.effectiveCornerRadius - targetColor: root.frameOwnsConnectedChrome ? "transparent" : root.effectiveBackgroundColor - borderColor: root.frameOwnsConnectedChrome ? "transparent" : root.effectiveBorderColor + targetColor: root.frameOwnsConnectedChrome ? Theme.withAlpha(root.effectiveBackgroundColor, 0) : root.effectiveBackgroundColor + borderColor: root.frameOwnsConnectedChrome ? Theme.withAlpha(root.effectiveBorderColor, 0) : root.effectiveBorderColor borderWidth: root.frameOwnsConnectedChrome ? 0 : root.effectiveBorderWidth shadowEnabled: !root.frameOwnsConnectedChrome && root.enableShadow && Theme.elevationEnabled && SettingsData.modalElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" } @@ -669,7 +669,7 @@ Item { anchors.fill: parent radius: root.effectiveCornerRadius color: "transparent" - border.color: (root.connectedSurfaceOverride || root.frameOwnsConnectedChrome) ? "transparent" : BlurService.borderColor + border.color: (root.connectedSurfaceOverride || root.frameOwnsConnectedChrome) ? Theme.withAlpha(BlurService.borderColor, 0) : BlurService.borderColor border.width: (root.connectedSurfaceOverride || root.frameOwnsConnectedChrome) ? 0 : BlurService.borderWidth z: 100 } diff --git a/quickshell/Modals/Common/InputModal.qml b/quickshell/Modals/Common/InputModal.qml index fcacb8aa3..a730d4f96 100644 --- a/quickshell/Modals/Common/InputModal.qml +++ b/quickshell/Modals/Common/InputModal.qml @@ -194,7 +194,7 @@ DankModal { height: 40 radius: Theme.cornerRadius color: Theme.surfaceVariantAlpha - border.color: textInput.activeFocus ? Theme.primary : "transparent" + border.color: textInput.activeFocus ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: textInput.activeFocus ? 1 : 0 TextInput { @@ -216,7 +216,7 @@ DankModal { anchors.fill: parent verticalAlignment: Text.AlignVCenter font.pixelSize: Theme.fontSizeMedium - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: Theme.onSurface_38 text: root.inputPlaceholder visible: textInput.text === "" && !textInput.activeFocus } @@ -238,14 +238,14 @@ DankModal { radius: Theme.cornerRadius color: { if (root.keyboardNavigation && root.selectedButton === 0) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; } else if (cancelButton.containsMouse) { return Theme.surfacePressed; } else { return Theme.surfaceVariantAlpha; } } - border.color: (root.keyboardNavigation && root.selectedButton === 0) ? Theme.primary : "transparent" + border.color: (root.keyboardNavigation && root.selectedButton === 0) ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: (root.keyboardNavigation && root.selectedButton === 0) ? 1 : 0 StyledText { @@ -273,14 +273,14 @@ DankModal { color: { const baseColor = root.confirmButtonColor; if (root.keyboardNavigation && root.selectedButton === 1) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, 1); + return Theme.withAlpha(baseColor, 1); } else if (confirmButton.containsMouse) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, 0.9); + return Theme.withAlpha(baseColor, 0.9); } else { return baseColor; } } - border.color: (root.keyboardNavigation && root.selectedButton === 1) ? "white" : "transparent" + border.color: (root.keyboardNavigation && root.selectedButton === 1) ? "white" : Qt.rgba(1, 1, 1, 0) border.width: (root.keyboardNavigation && root.selectedButton === 1) ? 1 : 0 StyledText { diff --git a/quickshell/Modals/DankLauncherV2/ActionPanel.qml b/quickshell/Modals/DankLauncherV2/ActionPanel.qml index 2f8612761..0199c6520 100644 --- a/quickshell/Modals/DankLauncherV2/ActionPanel.qml +++ b/quickshell/Modals/DankLauncherV2/ActionPanel.qml @@ -157,7 +157,7 @@ Rectangle { width: actionContent.implicitWidth + Theme.spacingM * 2 height: actionsRow.height radius: Theme.cornerRadius - color: index === root.selectedActionIndex ? Theme.primaryHover : actionArea.containsMouse ? Theme.surfaceHover : "transparent" + color: index === root.selectedActionIndex ? Theme.primaryHover : actionArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) Row { id: actionContent diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalConnected.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalConnected.qml index 8003f9863..fc11d6607 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalConnected.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalConnected.qml @@ -168,7 +168,7 @@ Item { } } readonly property int borderWidth: SettingsData.dankLauncherV2BorderEnabled ? SettingsData.dankLauncherV2BorderThickness : 0 - readonly property color effectiveBorderColor: connectedSurfaceOverride ? "transparent" : borderColor + readonly property color effectiveBorderColor: connectedSurfaceOverride ? Theme.withAlpha(borderColor, 0) : borderColor readonly property int effectiveBorderWidth: connectedSurfaceOverride ? 0 : borderWidth readonly property bool effectiveBlurEnabled: Theme.connectedSurfaceBlurEnabled @@ -797,8 +797,8 @@ Item { y: contentWrapper.y level: root.shadowLevel fallbackOffset: root.shadowFallbackOffset - targetColor: root.frameOwnsConnectedChrome ? "transparent" : root.backgroundColor - borderColor: root.frameOwnsConnectedChrome ? "transparent" : root.effectiveBorderColor + targetColor: root.frameOwnsConnectedChrome ? Theme.withAlpha(root.backgroundColor, 0) : root.backgroundColor + borderColor: root.frameOwnsConnectedChrome ? Theme.withAlpha(root.effectiveBorderColor, 0) : root.effectiveBorderColor borderWidth: root.frameOwnsConnectedChrome ? 0 : root.effectiveBorderWidth targetRadius: root.cornerRadius shadowEnabled: !root.frameOwnsConnectedChrome && Theme.elevationEnabled && SettingsData.modalElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" diff --git a/quickshell/Modals/DankLauncherV2/GridItem.qml b/quickshell/Modals/DankLauncherV2/GridItem.qml index b04a0c0e6..b876ef0fc 100644 --- a/quickshell/Modals/DankLauncherV2/GridItem.qml +++ b/quickshell/Modals/DankLauncherV2/GridItem.qml @@ -36,7 +36,7 @@ Rectangle { readonly property int computedIconSize: Math.min(48, Math.max(32, width * 0.45)) radius: Theme.cornerRadius - color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent" + color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) DankRipple { id: rippleLayer diff --git a/quickshell/Modals/DankLauncherV2/LauncherContent.qml b/quickshell/Modals/DankLauncherV2/LauncherContent.qml index af5276f12..f9822ee6b 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContent.qml +++ b/quickshell/Modals/DankLauncherV2/LauncherContent.qml @@ -381,7 +381,7 @@ FocusScope { width: buttonContent.width + Theme.spacingM * 2 height: 28 radius: Theme.cornerRadius - color: controller.searchMode === modelData.id ? Theme.buttonBg : modeArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: controller.searchMode === modelData.id ? Theme.buttonBg : modeArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) Row { id: buttonContent @@ -654,7 +654,7 @@ FocusScope { width: chipContent.width + Theme.spacingM * 2 height: sortDropdown.height radius: Theme.cornerRadius - color: controller.fileSearchType === modelData.id ? Theme.buttonBg : chipArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: controller.fileSearchType === modelData.id ? Theme.buttonBg : chipArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) Row { id: chipContent @@ -828,7 +828,7 @@ FocusScope { width: 40 height: 40 radius: Theme.cornerRadius - color: backButtonArea.containsMouse ? Theme.surfaceHover : "transparent" + color: backButtonArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) DankIcon { anchors.centerIn: parent @@ -1060,7 +1060,7 @@ FocusScope { width: 90 height: 40 radius: Theme.cornerRadius - color: saveButtonArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.9) : Theme.primary + color: saveButtonArea.containsMouse ? Theme.withAlpha(Theme.primary, 0.9) : Theme.primary StyledText { text: I18n.tr("Save") diff --git a/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml b/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml index f20dede8c..73d12b163 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml +++ b/quickshell/Modals/DankLauncherV2/LauncherContextMenu.qml @@ -507,7 +507,7 @@ Item { height: root.effectiveMenuHeight color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: root.openState ? 1 : 0 @@ -585,7 +585,7 @@ Item { anchors.centerIn: parent width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } } @@ -596,9 +596,9 @@ Item { radius: Theme.cornerRadius color: { if (root.keyboardNavigation && root.selectedMenuIndex === menuItemDelegate.itemIndex) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2); + return Theme.primaryPressed; } - return itemMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent"; + return itemMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0); } Row { diff --git a/quickshell/Modals/DankLauncherV2/ResultItem.qml b/quickshell/Modals/DankLauncherV2/ResultItem.qml index 7782f64c8..5056bbecb 100644 --- a/quickshell/Modals/DankLauncherV2/ResultItem.qml +++ b/quickshell/Modals/DankLauncherV2/ResultItem.qml @@ -37,7 +37,7 @@ Rectangle { width: parent?.width ?? 200 height: 52 - color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent" + color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius DankRipple { @@ -170,7 +170,7 @@ Rectangle { height: 28 radius: 14 anchors.verticalCenter: parent.verticalCenter - color: allModeToggleArea.containsMouse ? Theme.surfaceHover : "transparent" + color: allModeToggleArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) property bool isAllowed: { if (root.item?.type !== "plugin_browse") diff --git a/quickshell/Modals/DankLauncherV2/SectionHeader.qml b/quickshell/Modals/DankLauncherV2/SectionHeader.qml index f1bdd505a..b82560c54 100644 --- a/quickshell/Modals/DankLauncherV2/SectionHeader.qml +++ b/quickshell/Modals/DankLauncherV2/SectionHeader.qml @@ -20,7 +20,7 @@ Rectangle { width: parent?.width ?? 200 height: 32 - color: isSticky ? "transparent" : (hoverArea.containsMouse ? Theme.surfaceHover : "transparent") + color: isSticky ? Theme.withAlpha(Theme.surfaceHover, 0) : (hoverArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0)) radius: Theme.cornerRadius MouseArea { @@ -81,7 +81,7 @@ Rectangle { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: chipArea.containsMouse || categoryPopup.visible ? Theme.surfaceContainerHigh : "transparent" + color: chipArea.containsMouse || categoryPopup.visible ? Theme.surfaceContainerHigh : Theme.withAlpha(Theme.surfaceContainerHigh, 0) border.color: categoryPopup.visible ? Theme.primary : Theme.outlineMedium border.width: categoryPopup.visible ? 2 : 1 } @@ -145,7 +145,7 @@ Rectangle { contentItem: Rectangle { radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 1) + color: Theme.withAlpha(Theme.surfaceContainer, 1) border.color: Theme.primary border.width: 2 @@ -179,7 +179,7 @@ Rectangle { height: 32 radius: Theme.cornerRadius readonly property bool isCurrent: categoryChip.currentCategory === modelData - color: isCurrent ? Theme.primaryHover : catArea.containsMouse ? Theme.primaryHoverLight : "transparent" + color: isCurrent ? Theme.primaryHover : catArea.containsMouse ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) Row { anchors.left: parent.left @@ -269,7 +269,7 @@ Rectangle { width: 20 height: 20 radius: 4 - color: root.viewMode === modelData.mode ? Theme.primaryHover : modeArea.containsMouse ? Theme.surfaceHover : "transparent" + color: root.viewMode === modelData.mode ? Theme.primaryHover : modeArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) DankIcon { anchors.centerIn: parent diff --git a/quickshell/Modals/DankLauncherV2/SpotlightResultRow.qml b/quickshell/Modals/DankLauncherV2/SpotlightResultRow.qml index 728490cfc..a77351079 100644 --- a/quickshell/Modals/DankLauncherV2/SpotlightResultRow.qml +++ b/quickshell/Modals/DankLauncherV2/SpotlightResultRow.qml @@ -76,7 +76,7 @@ Rectangle { width: parent?.width ?? 200 height: 64 radius: Theme.cornerRadius - color: root.isSelected ? Theme.primaryPressed : root.isHovered ? Theme.primaryHoverLight : "transparent" + color: root.isSelected ? Theme.primaryPressed : root.isHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) Behavior on color { ColorAnimation { @@ -225,7 +225,7 @@ Rectangle { height: 28 radius: height / 2 anchors.verticalCenter: parent.verticalCenter - color: quickToggleArea.containsMouse ? Theme.surfaceHover : "transparent" + color: quickToggleArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) readonly property bool isAllowed: { if (root.item?.type !== "plugin_browse") diff --git a/quickshell/Modals/DankLauncherV2/TileItem.qml b/quickshell/Modals/DankLauncherV2/TileItem.qml index b8110c43f..6ca6639f8 100644 --- a/quickshell/Modals/DankLauncherV2/TileItem.qml +++ b/quickshell/Modals/DankLauncherV2/TileItem.qml @@ -19,7 +19,7 @@ Rectangle { signal rightClicked(real mouseX, real mouseY) radius: Theme.cornerRadius - color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : "transparent" + color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) border.width: isSelected ? 2 : 0 border.color: Theme.primary @@ -93,7 +93,7 @@ Rectangle { Rectangle { anchors.fill: parent - color: root.isHovered ? Theme.withAlpha(Theme.surfaceVariant, 0.2) : "transparent" + color: root.isHovered ? Theme.withAlpha(Theme.surfaceVariant, 0.2) : Theme.withAlpha(Theme.surfaceVariant, 0) } } @@ -155,7 +155,7 @@ Rectangle { width: root.hasScreencopy ? 28 : 40 height: root.hasScreencopy ? 28 : 16 radius: root.hasScreencopy ? 14 : 4 - color: root.hasScreencopy ? Theme.surfaceContainer : "transparent" + color: root.hasScreencopy ? Theme.surfaceContainer : Theme.withAlpha(Theme.surfaceContainer, 0) visible: attributionImage.status === Image.Ready opacity: 0.95 diff --git a/quickshell/Modals/DisplayConfirmationModal.qml b/quickshell/Modals/DisplayConfirmationModal.qml index 8e7924b71..8ca4e745d 100644 --- a/quickshell/Modals/DisplayConfirmationModal.qml +++ b/quickshell/Modals/DisplayConfirmationModal.qml @@ -129,7 +129,7 @@ DankModal { width: Math.max(70, revertText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: revertArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: revertArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modals/FileBrowser/FileBrowserGridDelegate.qml b/quickshell/Modals/FileBrowser/FileBrowserGridDelegate.qml index 8ecd3abe1..8793aa5f9 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserGridDelegate.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserGridDelegate.qml @@ -136,9 +136,9 @@ StyledRect { if (keyboardNavigationActive && delegateRoot.index === selectedIndex) return Theme.surfacePressed; - return mouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent"; + return mouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0); } - border.color: keyboardNavigationActive && delegateRoot.index === selectedIndex ? Theme.primary : "transparent" + border.color: keyboardNavigationActive && delegateRoot.index === selectedIndex ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: (keyboardNavigationActive && delegateRoot.index === selectedIndex) ? 2 : 0 Component.onCompleted: { diff --git a/quickshell/Modals/FileBrowser/FileBrowserItemContextMenu.qml b/quickshell/Modals/FileBrowser/FileBrowserItemContextMenu.qml index 966f84aa8..2f84aa886 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserItemContextMenu.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserItemContextMenu.qml @@ -89,7 +89,7 @@ Popup { contentItem: Rectangle { color: Theme.floatingSurface radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 Column { @@ -110,7 +110,7 @@ Popup { if (!modelData.enabled || !area.containsMouse) return "transparent"; if (modelData.dangerous) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12); + return Theme.errorHover; return BlurService.hoverColor(Theme.widgetBaseHoverColor); } diff --git a/quickshell/Modals/FileBrowser/FileBrowserListDelegate.qml b/quickshell/Modals/FileBrowser/FileBrowserListDelegate.qml index 634154197..970b5542f 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserListDelegate.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserListDelegate.qml @@ -139,9 +139,9 @@ StyledRect { color: { if (keyboardNavigationActive && listDelegateRoot.index === selectedIndex) return Theme.surfacePressed; - return listMouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent"; + return listMouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0); } - border.color: keyboardNavigationActive && listDelegateRoot.index === selectedIndex ? Theme.primary : "transparent" + border.color: keyboardNavigationActive && listDelegateRoot.index === selectedIndex ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: (keyboardNavigationActive && listDelegateRoot.index === selectedIndex) ? 2 : 0 Component.onCompleted: { diff --git a/quickshell/Modals/FileBrowser/FileBrowserNavigation.qml b/quickshell/Modals/FileBrowser/FileBrowserNavigation.qml index 06fab5968..4e315b6f3 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserNavigation.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserNavigation.qml @@ -26,7 +26,7 @@ Row { width: 32 height: 32 radius: Theme.cornerRadius - color: (backButtonMouseArea.containsMouse || (backButtonFocused && keyboardNavigationActive)) && currentPath !== homeDir ? Theme.surfaceVariant : "transparent" + color: (backButtonMouseArea.containsMouse || (backButtonFocused && keyboardNavigationActive)) && currentPath !== homeDir ? Theme.surfaceVariant : Theme.withAlpha(Theme.surfaceVariant, 0) opacity: currentPath !== homeDir ? 1 : 0 anchors.verticalCenter: parent.verticalCenter @@ -56,8 +56,8 @@ Row { StyledRect { anchors.fill: parent radius: Theme.cornerRadius - color: pathEditMode ? Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) : "transparent" - border.color: pathEditMode ? Theme.primary : "transparent" + color: pathEditMode ? Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainer, 0) + border.color: pathEditMode ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: pathEditMode ? 1 : 0 visible: !pathEditMode diff --git a/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml b/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml index 1cf95c7f5..99a3d87f7 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml @@ -34,7 +34,7 @@ StyledRect { width: parent?.width ?? 0 height: 38 radius: Theme.cornerRadius - color: quickAccessMouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : (currentPath === modelData?.path ? Theme.surfacePressed : "transparent") + color: quickAccessMouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : (currentPath === modelData?.path ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0)) Row { anchors.fill: parent diff --git a/quickshell/Modals/FileBrowser/FileBrowserSortMenu.qml b/quickshell/Modals/FileBrowser/FileBrowserSortMenu.qml index 019e1e6f1..3b030b246 100644 --- a/quickshell/Modals/FileBrowser/FileBrowserSortMenu.qml +++ b/quickshell/Modals/FileBrowser/FileBrowserSortMenu.qml @@ -60,7 +60,7 @@ StyledRect { width: sortColumn?.width ?? 0 height: 32 radius: Theme.cornerRadius - color: sortMouseArea.containsMouse ? Theme.surfaceVariant : (sortBy === modelData?.value ? Theme.surfacePressed : "transparent") + color: sortMouseArea.containsMouse ? Theme.surfaceVariant : (sortBy === modelData?.value ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0)) Row { anchors.fill: parent @@ -114,7 +114,7 @@ StyledRect { width: sortColumn?.width ?? 0 height: 32 radius: Theme.cornerRadius - color: ascMouseArea.containsMouse ? Theme.surfaceVariant : (sortAscending ? Theme.surfacePressed : "transparent") + color: ascMouseArea.containsMouse ? Theme.surfaceVariant : (sortAscending ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0)) Row { anchors.fill: parent @@ -152,7 +152,7 @@ StyledRect { width: sortColumn?.width ?? 0 height: 32 radius: Theme.cornerRadius - color: descMouseArea.containsMouse ? Theme.surfaceVariant : (!sortAscending ? Theme.surfacePressed : "transparent") + color: descMouseArea.containsMouse ? Theme.surfaceVariant : (!sortAscending ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0)) Row { anchors.fill: parent diff --git a/quickshell/Modals/FileBrowser/FileInfo.qml b/quickshell/Modals/FileBrowser/FileInfo.qml index df85f1525..31db7d72f 100644 --- a/quickshell/Modals/FileBrowser/FileInfo.qml +++ b/quickshell/Modals/FileBrowser/FileInfo.qml @@ -13,7 +13,7 @@ Rectangle { height: 200 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) + color: Theme.withAlpha(Theme.surfaceContainer, 0.95) border.color: Theme.secondary border.width: 2 opacity: showFileInfo ? 1 : 0 diff --git a/quickshell/Modals/FileBrowser/KeyboardHints.qml b/quickshell/Modals/FileBrowser/KeyboardHints.qml index 1910810dc..e4f10f4a2 100644 --- a/quickshell/Modals/FileBrowser/KeyboardHints.qml +++ b/quickshell/Modals/FileBrowser/KeyboardHints.qml @@ -9,7 +9,7 @@ Rectangle { height: 80 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) + color: Theme.withAlpha(Theme.surfaceContainer, 0.95) border.color: Theme.primary border.width: 2 opacity: showHints ? 1 : 0 diff --git a/quickshell/Modals/Greeter/GreeterStatusCard.qml b/quickshell/Modals/Greeter/GreeterStatusCard.qml index af0d5d67e..32d4df1b8 100644 --- a/quickshell/Modals/Greeter/GreeterStatusCard.qml +++ b/quickshell/Modals/Greeter/GreeterStatusCard.qml @@ -18,7 +18,7 @@ Rectangle { radius: Theme.cornerRadius color: bgColor border.width: selected ? 2 : 0 - border.color: selected ? iconColor : "transparent" + border.color: selected ? iconColor : Theme.withAlpha(iconColor, 0) scale: mouseArea.pressed ? 0.97 : 1 Behavior on scale { diff --git a/quickshell/Modals/MuxModal.qml b/quickshell/Modals/MuxModal.qml index b216bc0ce..292ec84f5 100644 --- a/quickshell/Modals/MuxModal.qml +++ b/quickshell/Modals/MuxModal.qml @@ -414,7 +414,7 @@ DankModal { width: parent.width height: 64 radius: Theme.cornerRadius - color: muxModal.selectedIndex === index ? Theme.primaryContainer : (sessionMouse.containsMouse ? Theme.surfaceContainerHigh : "transparent") + color: muxModal.selectedIndex === index ? Theme.primaryContainer : (sessionMouse.containsMouse ? Theme.surfaceContainerHigh : Theme.withAlpha(Theme.surfaceContainerHigh, 0)) MouseArea { id: sessionMouse @@ -478,7 +478,7 @@ DankModal { Layout.preferredHeight: 36 radius: 18 visible: MuxService.supportsRename - color: renameMouse.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: renameMouse.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) DankIcon { anchors.centerIn: parent @@ -501,7 +501,7 @@ DankModal { Layout.preferredWidth: 36 Layout.preferredHeight: 36 radius: 18 - color: deleteMouse.containsMouse ? Theme.errorContainer : "transparent" + color: deleteMouse.containsMouse ? Theme.errorContainer : Theme.withAlpha(Theme.errorContainer, 0) DankIcon { anchors.centerIn: parent diff --git a/quickshell/Modals/PolkitAuthContent.qml b/quickshell/Modals/PolkitAuthContent.qml index f1c331845..8fbfc7276 100644 --- a/quickshell/Modals/PolkitAuthContent.qml +++ b/quickshell/Modals/PolkitAuthContent.qml @@ -314,7 +314,7 @@ FocusScope { width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: cancelArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 enabled: !root.isLoading diff --git a/quickshell/Modals/PowerMenuModal.qml b/quickshell/Modals/PowerMenuModal.qml index 9652ba450..277d17d23 100644 --- a/quickshell/Modals/PowerMenuModal.qml +++ b/quickshell/Modals/PowerMenuModal.qml @@ -551,12 +551,12 @@ DankModal { radius: Theme.cornerRadius color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; if (mouseArea.containsMouse) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08); + return Theme.primaryHoverLight; + return Theme.surfaceHover; } - border.color: isSelected ? Theme.primary : "transparent" + border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: isSelected ? 2 : 0 Rectangle { @@ -585,10 +585,10 @@ DankModal { width: parent.width * root.holdProgress color: { if (gridButtonRect.modelData === "poweroff") - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3); + return Theme.errorSelected; if (gridButtonRect.modelData === "reboot") - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.3); - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.withAlpha(Theme.warning, 0.3); + return Theme.primarySelected; } } } @@ -626,13 +626,13 @@ DankModal { width: 20 height: 16 radius: 4 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.1) + color: Theme.onSurface_12 anchors.horizontalCenter: parent.horizontalCenter StyledText { text: gridButtonRect.actionData.key font.pixelSize: Theme.fontSizeSmall - 1 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium anchors.centerIn: parent } @@ -688,12 +688,12 @@ DankModal { radius: Theme.cornerRadius color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; if (listMouseArea.containsMouse) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08); + return Theme.primaryHoverLight; + return Theme.surfaceHover; } - border.color: isSelected ? Theme.primary : "transparent" + border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: isSelected ? 2 : 0 Rectangle { @@ -722,10 +722,10 @@ DankModal { width: parent.width * root.holdProgress color: { if (listButtonRect.modelData === "poweroff") - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3); + return Theme.errorSelected; if (listButtonRect.modelData === "reboot") - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.3); - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.withAlpha(Theme.warning, 0.3); + return Theme.primarySelected; } } } @@ -770,7 +770,7 @@ DankModal { width: 28 height: 20 radius: 4 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.1) + color: Theme.onSurface_12 anchors { right: parent.right rightMargin: Theme.spacingM @@ -780,7 +780,7 @@ DankModal { StyledText { text: listButtonRect.actionData.key font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium anchors.centerIn: parent } @@ -820,7 +820,7 @@ DankModal { DankIcon { name: root.showHoldHint ? "warning" : "touch_app" size: Theme.fontSizeSmall - color: root.showHoldHint ? Theme.warning : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: root.showHoldHint ? Theme.warning : Theme.surfaceTextSecondary anchors.verticalCenter: parent.verticalCenter } @@ -840,7 +840,7 @@ DankModal { return I18n.tr("Hold to confirm (%1s)").arg(SettingsData.powerActionHoldDuration); } font.pixelSize: Theme.fontSizeSmall - color: root.showHoldHint ? Theme.warning : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: root.showHoldHint ? Theme.warning : Theme.surfaceTextSecondary anchors.verticalCenter: parent.verticalCenter } } diff --git a/quickshell/Modals/PowerProfileModal.qml b/quickshell/Modals/PowerProfileModal.qml index fdceec0a5..cdb9e862f 100644 --- a/quickshell/Modals/PowerProfileModal.qml +++ b/quickshell/Modals/PowerProfileModal.qml @@ -174,15 +174,15 @@ DankModal { color: { if (isActive) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16); + return Theme.primaryPressed; if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08); + return Theme.primaryHoverLight; if (mouseArea.containsMouse) - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.12); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.06); + return Theme.surfacePressed; + return Theme.surfaceHover; } - border.color: isActive ? Theme.primary : (isSelected ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.5) : "transparent") + border.color: isActive ? Theme.primary : (isSelected ? Theme.withAlpha(Theme.primary, 0.5) : Theme.withAlpha(Theme.primary, 0)) border.width: (isActive || isSelected) ? 2 : 0 // Shortcut Key Badge on Top-Right Corner @@ -193,8 +193,8 @@ DankModal { width: 20 height: 20 radius: 4 - color: isActive ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) - border.color: isActive ? Theme.primary : "transparent" + color: isActive ? Theme.primaryPressed : Theme.surfaceTextHover + border.color: isActive ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: isActive ? 1 : 0 StyledText { diff --git a/quickshell/Modals/ProcessListModal.qml b/quickshell/Modals/ProcessListModal.qml index a313fbd69..cab0a7b2c 100644 --- a/quickshell/Modals/ProcessListModal.qml +++ b/quickshell/Modals/ProcessListModal.qml @@ -195,7 +195,7 @@ FloatingWindow { width: 400 height: 200 radius: Theme.cornerRadius - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.1) + color: Theme.errorHover border.color: Theme.error border.width: 2 visible: !DgopService.dgopAvailable @@ -326,8 +326,8 @@ FloatingWindow { width: tabRowContent.implicitWidth + Theme.spacingM * 2 height: Math.round(Theme.fontSizeMedium * 3.1) radius: Theme.cornerRadius - color: currentTab === index ? Theme.primaryPressed : (tabMouseArea.containsMouse ? Theme.primaryHoverLight : "transparent") - border.color: currentTab === index ? Theme.primary : "transparent" + color: currentTab === index ? Theme.primaryPressed : (tabMouseArea.containsMouse ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0)) + border.color: currentTab === index ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: currentTab === index ? 1 : 0 Row { diff --git a/quickshell/Modals/WifiPasswordModal.qml b/quickshell/Modals/WifiPasswordModal.qml index a1539f6c4..d1299febe 100644 --- a/quickshell/Modals/WifiPasswordModal.qml +++ b/quickshell/Modals/WifiPasswordModal.qml @@ -626,7 +626,7 @@ DankModal { width: 20 height: 20 radius: 4 - color: checked ? Theme.primary : "transparent" + color: checked ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.color: checked ? Theme.primary : Theme.outlineButton border.width: 2 @@ -667,7 +667,7 @@ DankModal { width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: cancelArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modals/WindowRuleModal.qml b/quickshell/Modals/WindowRuleModal.qml index 4f458a603..af1dd0046 100644 --- a/quickshell/Modals/WindowRuleModal.qml +++ b/quickshell/Modals/WindowRuleModal.qml @@ -504,7 +504,7 @@ FloatingWindow { width: 20 height: 20 radius: 4 - color: parent.indeterminate ? Theme.surfaceVariant : (checked ? Theme.primary : "transparent") + color: parent.indeterminate ? Theme.surfaceVariant : (checked ? Theme.primary : Theme.withAlpha(Theme.primary, 0)) border.color: parent.indeterminate ? Theme.outlineButton : (checked ? Theme.primary : Theme.outlineButton) border.width: 2 anchors.verticalCenter: parent.verticalCenter @@ -1841,7 +1841,7 @@ FloatingWindow { width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: cancelArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modals/WorkspaceRenameModal.qml b/quickshell/Modals/WorkspaceRenameModal.qml index fc91d8c18..43cbd4da2 100644 --- a/quickshell/Modals/WorkspaceRenameModal.qml +++ b/quickshell/Modals/WorkspaceRenameModal.qml @@ -151,7 +151,7 @@ FloatingWindow { width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: cancelArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modules/BuiltinDesktopPlugins/SystemMonitorWidget.qml b/quickshell/Modules/BuiltinDesktopPlugins/SystemMonitorWidget.qml index 1d21d6bfd..a030e4d50 100644 --- a/quickshell/Modules/BuiltinDesktopPlugins/SystemMonitorWidget.qml +++ b/quickshell/Modules/BuiltinDesktopPlugins/SystemMonitorWidget.qml @@ -405,8 +405,8 @@ Item { var c = root.accentColor; var grad = ctx.createLinearGradient(0, 0, 0, height); - grad.addColorStop(0, Qt.rgba(c.r, c.g, c.b, 0.3)); - grad.addColorStop(1, Qt.rgba(c.r, c.g, c.b, 0.05)); + grad.addColorStop(0, Theme.withAlpha(c, 0.3)); + grad.addColorStop(1, Theme.withAlpha(c, 0.05)); ctx.fillStyle = grad; ctx.beginPath(); @@ -420,7 +420,7 @@ Item { ctx.closePath(); ctx.fill(); - ctx.strokeStyle = Qt.rgba(c.r, c.g, c.b, 0.6); + ctx.strokeStyle = Theme.withAlpha(c, 0.6); ctx.lineWidth = 1.5; ctx.beginPath(); for (var j = 0; j < hist.length; j++) { @@ -431,7 +431,7 @@ Item { ctx.stroke(); if (hist2 && hist2.length >= 2) { - ctx.strokeStyle = Qt.rgba(c.r, c.g, c.b, 0.3); + ctx.strokeStyle = Theme.withAlpha(c, 0.3); ctx.lineWidth = 1; ctx.beginPath(); for (var m = 0; m < hist2.length; m++) { diff --git a/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml b/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml index b3dadaaed..b4469bd0c 100644 --- a/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml +++ b/quickshell/Modules/ControlCenter/BuiltinPlugins/CupsWidget.qml @@ -206,7 +206,7 @@ PluginComponent { Rectangle { height: 1 width: parent.width - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } DankFlickable { diff --git a/quickshell/Modules/ControlCenter/BuiltinPlugins/DisplayProfilesWidget.qml b/quickshell/Modules/ControlCenter/BuiltinPlugins/DisplayProfilesWidget.qml index 75130c7dd..ffbb76cd8 100644 --- a/quickshell/Modules/ControlCenter/BuiltinPlugins/DisplayProfilesWidget.qml +++ b/quickshell/Modules/ControlCenter/BuiltinPlugins/DisplayProfilesWidget.qml @@ -96,7 +96,7 @@ PluginComponent { width: autoLabel.implicitWidth + Theme.spacingL * 2 height: 28 radius: 14 - color: root.autoMode ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16) : (autoMouseArea.containsMouse ? Theme.surfaceLight : "transparent") + color: root.autoMode ? Theme.primaryPressed : (autoMouseArea.containsMouse ? Theme.surfaceLight : Theme.withAlpha(Theme.surfaceLight, 0)) border.color: root.autoMode ? Theme.primary : Theme.outlineMedium border.width: root.autoMode ? 1 : Theme.layerOutlineWidth @@ -170,7 +170,7 @@ PluginComponent { radius: Theme.cornerRadius color: { if (isActive) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; if (profileMouseArea.containsMouse) return Theme.surfaceLight; return Theme.floatingSurface; diff --git a/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml b/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml index d733caea2..f598762b4 100644 --- a/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml +++ b/quickshell/Modules/ControlCenter/BuiltinPlugins/TailscaleWidget.qml @@ -333,7 +333,7 @@ PluginComponent { width: peerListColumn.width height: peerCardColumn.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius - color: modelData.hostname === (TailscaleService.selfNode ? TailscaleService.selfNode.hostname : "") ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : Theme.surfaceContainerHighest + color: modelData.hostname === (TailscaleService.selfNode ? TailscaleService.selfNode.hostname : "") ? Theme.primaryHoverLight : Theme.surfaceContainerHighest property bool isSelf: modelData.hostname === (TailscaleService.selfNode ? TailscaleService.selfNode.hostname : "") property bool isExpanded: detailRoot.expandedHostname === modelData.hostname diff --git a/quickshell/Modules/ControlCenter/Components/ActionTile.qml b/quickshell/Modules/ControlCenter/Components/ActionTile.qml index 1b1adb0f1..ebae72aa4 100644 --- a/quickshell/Modules/ControlCenter/Components/ActionTile.qml +++ b/quickshell/Modules/ControlCenter/Components/ActionTile.qml @@ -43,7 +43,7 @@ Rectangle { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: mouseArea.containsMouse ? hoverTint(root.color) : "transparent" + color: mouseArea.containsMouse ? hoverTint(root.color) : Theme.withAlpha(hoverTint(root.color), 0) opacity: mouseArea.containsMouse ? 0.08 : 0.0 Behavior on opacity { diff --git a/quickshell/Modules/ControlCenter/Components/DiskUsageWidgetConfigMenu.qml b/quickshell/Modules/ControlCenter/Components/DiskUsageWidgetConfigMenu.qml index 0c1c75fe8..25cd32c63 100644 --- a/quickshell/Modules/ControlCenter/Components/DiskUsageWidgetConfigMenu.qml +++ b/quickshell/Modules/ControlCenter/Components/DiskUsageWidgetConfigMenu.qml @@ -13,7 +13,7 @@ Rectangle { height: menuColumn.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius color: Theme.surfaceContainer - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.16) + border.color: Theme.outlineStrong border.width: 1 MouseArea { diff --git a/quickshell/Modules/ControlCenter/Components/DragDropWidgetWrapper.qml b/quickshell/Modules/ControlCenter/Components/DragDropWidgetWrapper.qml index 3142abf1e..572d6af37 100644 --- a/quickshell/Modules/ControlCenter/Components/DragDropWidgetWrapper.qml +++ b/quickshell/Modules/ControlCenter/Components/DragDropWidgetWrapper.qml @@ -337,7 +337,7 @@ Item { Rectangle { anchors.fill: parent - color: editMode ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: editMode ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius border.color: "transparent" border.width: 0 diff --git a/quickshell/Modules/ControlCenter/Components/EditControls.qml b/quickshell/Modules/ControlCenter/Components/EditControls.qml index 8a5ae7121..3b3cee653 100644 --- a/quickshell/Modules/ControlCenter/Components/EditControls.qml +++ b/quickshell/Modules/ControlCenter/Components/EditControls.qml @@ -219,7 +219,7 @@ Row { width: (parent.width - Theme.spacingS * 2) / 3 height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + color: Theme.primaryHover border.color: Theme.primary border.width: 0 @@ -253,7 +253,7 @@ Row { width: (parent.width - Theme.spacingS * 2) / 3 height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) + color: Theme.warningHover border.color: Theme.warning border.width: 0 @@ -287,7 +287,7 @@ Row { width: (parent.width - Theme.spacingS * 2) / 3 height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) + color: Theme.errorHover border.color: Theme.error border.width: 0 diff --git a/quickshell/Modules/ControlCenter/Components/EditModeWidgetDelegate.qml b/quickshell/Modules/ControlCenter/Components/EditModeWidgetDelegate.qml index 426ab27a8..e4755032d 100644 --- a/quickshell/Modules/ControlCenter/Components/EditModeWidgetDelegate.qml +++ b/quickshell/Modules/ControlCenter/Components/EditModeWidgetDelegate.qml @@ -233,7 +233,7 @@ Item { Rectangle { anchors.fill: parent - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) + color: Theme.primaryHoverLight radius: Theme.cornerRadius border.color: "transparent" border.width: 0 diff --git a/quickshell/Modules/ControlCenter/Components/PowerButton.qml b/quickshell/Modules/ControlCenter/Components/PowerButton.qml index 8ed74445f..e8c474906 100644 --- a/quickshell/Modules/ControlCenter/Components/PowerButton.qml +++ b/quickshell/Modules/ControlCenter/Components/PowerButton.qml @@ -15,7 +15,7 @@ Rectangle { height: 34 radius: Theme.cornerRadius - color: mouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.5) + color: mouseArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceVariant, 0.5) Row { anchors.centerIn: parent diff --git a/quickshell/Modules/ControlCenter/Details/AudioInputDetail.qml b/quickshell/Modules/ControlCenter/Details/AudioInputDetail.qml index 698d82a0a..4877ba534 100644 --- a/quickshell/Modules/ControlCenter/Details/AudioInputDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/AudioInputDetail.qml @@ -77,7 +77,7 @@ Rectangle { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: (Theme.iconSize + Theme.spacingS * 2) / 2 - color: iconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: iconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankRipple { id: iconRipple @@ -273,7 +273,7 @@ Rectangle { radius: height / 2 color: { const isThisDevicePinned = audioContent.getPinnedInputs().includes(modelData.name); - return isThisDevicePinned ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05); + return isThisDevicePinned ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceText, 0.05); } Row { diff --git a/quickshell/Modules/ControlCenter/Details/AudioOutputDetail.qml b/quickshell/Modules/ControlCenter/Details/AudioOutputDetail.qml index 334bad940..b54f86dba 100644 --- a/quickshell/Modules/ControlCenter/Details/AudioOutputDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/AudioOutputDetail.qml @@ -77,7 +77,7 @@ Rectangle { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: (Theme.iconSize + Theme.spacingS * 2) / 2 - color: iconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: iconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankRipple { id: muteRipple @@ -282,7 +282,7 @@ Rectangle { radius: height / 2 color: { const isThisDevicePinned = audioContent.getPinnedOutputs().includes(modelData.name); - return isThisDevicePinned ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05); + return isThisDevicePinned ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceText, 0.05); } Row { @@ -463,7 +463,7 @@ Rectangle { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: Theme.cornerRadius - color: appIconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.primary, 0) + color: appIconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primary, 0) DankRipple { id: appMuteRipple diff --git a/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml b/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml index 5510165ba..805f36626 100644 --- a/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BatteryDetail.qml @@ -214,8 +214,8 @@ Rectangle { width: parent.width height: degradationContent.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) - border.color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3) + color: Theme.errorHover + border.color: Theme.errorSelected border.width: 0 visible: (typeof PowerProfiles !== "undefined") && PowerProfiles.degradationReason !== PerformanceDegradationReason.None @@ -253,7 +253,7 @@ Rectangle { StyledText { text: (typeof PowerProfiles !== "undefined") ? PerformanceDegradationReason.toString(PowerProfiles.degradationReason) : "" font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.8) + color: Theme.withAlpha(Theme.error, 0.8) wrapMode: Text.WordWrap width: parent.width horizontalAlignment: Text.AlignLeft diff --git a/quickshell/Modules/ControlCenter/Details/BluetoothCodecSelector.qml b/quickshell/Modules/ControlCenter/Details/BluetoothCodecSelector.qml index 5d9e43139..d7b825434 100644 --- a/quickshell/Modules/ControlCenter/Details/BluetoothCodecSelector.qml +++ b/quickshell/Modules/ControlCenter/Details/BluetoothCodecSelector.qml @@ -217,7 +217,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.05) + color: Theme.outlineLight } StyledText { diff --git a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml index e06485c9b..27cfb737c 100644 --- a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml @@ -114,7 +114,7 @@ Rectangle { width: 100 height: 36 radius: 18 - color: scanMouseArea.containsMouse && adapterEnabled ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent" + color: scanMouseArea.containsMouse && adapterEnabled ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0) border.color: adapterEnabled ? Theme.primary : Theme.outlineStrong border.width: 0 visible: adapterEnabled @@ -240,7 +240,7 @@ Rectangle { color: { if (isConnecting) - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12); + return Theme.warningHover; if (deviceMouseArea.containsMouse) return Theme.primaryHoverLight; return Theme.surfaceLight; @@ -339,7 +339,7 @@ Rectangle { width: pinBluetoothRow.width + Theme.spacingS * 2 height: 28 radius: height / 2 - color: pairedDelegate.isPinned ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05) + color: pairedDelegate.isPinned ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceText, 0.05) Row { id: pinBluetoothRow @@ -447,7 +447,7 @@ Rectangle { anchors.centerIn: parent name: "sync" size: 24 - color: Qt.rgba(Theme.surfaceText.r || 0.8, Theme.surfaceText.g || 0.8, Theme.surfaceText.b || 0.8, 0.4) + color: Theme.onSurface_38 smoothTransform: BluetoothService.adapter?.discovering ?? false RotationAnimator on rotation { @@ -626,7 +626,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -655,7 +655,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -683,7 +683,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -707,7 +707,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.08) : "transparent" + color: parent.hovered ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) radius: Theme.cornerRadius / 2 } diff --git a/quickshell/Modules/ControlCenter/Details/BrightnessDetail.qml b/quickshell/Modules/ControlCenter/Details/BrightnessDetail.qml index 3b02810bb..ab8fab09d 100644 --- a/quickshell/Modules/ControlCenter/Details/BrightnessDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BrightnessDetail.qml @@ -221,7 +221,7 @@ Rectangle { width: globalPinRow.width + Theme.spacingS * 2 height: 28 radius: height / 2 - color: monitorHeader.currentDevicePinned ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16) : Theme.withAlpha(Theme.surfaceText, 0.05) + color: monitorHeader.currentDevicePinned ? Theme.primaryPressed : Theme.withAlpha(Theme.surfaceText, 0.05) Row { id: globalPinRow @@ -282,7 +282,7 @@ Rectangle { height: 100 radius: Theme.cornerRadius color: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency) - border.color: selected ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: selected ? Theme.primary : Theme.outlineStrong border.width: selected ? 2 : 0 Column { @@ -476,7 +476,7 @@ Rectangle { height: 28 radius: Theme.cornerRadius visible: root.screenName && root.screenName.length > 0 && DisplayService.devices && DisplayService.devices.length > 1 - color: devicePinnedHere ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16) : Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency) + color: devicePinnedHere ? Theme.primaryPressed : Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency) DankIcon { anchors.centerIn: parent @@ -498,7 +498,7 @@ Rectangle { width: parent.width height: 24 radius: height / 2 - color: SessionData.getBrightnessExponential(modelData.name) ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05) + color: SessionData.getBrightnessExponential(modelData.name) ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceText, 0.05) Row { anchors.centerIn: parent diff --git a/quickshell/Modules/ControlCenter/Details/DoNotDisturbDetail.qml b/quickshell/Modules/ControlCenter/Details/DoNotDisturbDetail.qml index 12c51c9b6..37230f233 100644 --- a/quickshell/Modules/ControlCenter/Details/DoNotDisturbDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/DoNotDisturbDetail.qml @@ -149,7 +149,7 @@ Rectangle { width: (contentColumn.width - Theme.spacingS * 2) / 3 height: 36 radius: Theme.cornerRadius - color: presetArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16) : Theme.floatingSurface + color: presetArea.containsMouse ? Theme.primaryPressed : Theme.floatingSurface border.color: Theme.outlineStrong border.width: 1 @@ -183,7 +183,7 @@ Rectangle { width: (contentColumn.width - Theme.spacingS) / 2 height: 36 radius: Theme.cornerRadius - color: foreverArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16) : Theme.floatingSurface + color: foreverArea.containsMouse ? Theme.primaryPressed : Theme.floatingSurface border.color: Theme.outlineStrong border.width: 1 @@ -221,7 +221,7 @@ Rectangle { height: 36 radius: Theme.cornerRadius visible: SessionData.doNotDisturb - color: offArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.18) : Theme.floatingSurface + color: offArea.containsMouse ? Theme.errorPressed : Theme.floatingSurface border.color: Theme.outlineStrong border.width: 1 diff --git a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml index af171510a..21b067033 100644 --- a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml @@ -219,7 +219,7 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter name: "wifi_off" size: 48 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary } StyledText { @@ -236,7 +236,7 @@ Rectangle { width: enableWifiLabel.implicitWidth + Theme.spacingL * 2 height: enableWifiLabel.implicitHeight + Theme.spacingM * 2 radius: height / 2 - color: enableWifiButton.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) + color: enableWifiButton.containsMouse ? Theme.primaryHover : Theme.primaryHoverLight border.width: 0 border.color: Theme.primary @@ -398,7 +398,7 @@ Rectangle { color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.width: 0 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: Theme.outlineStrong } MenuItem { @@ -415,7 +415,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -439,7 +439,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.08) : "transparent" + color: parent.hovered ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) radius: Theme.cornerRadius / 2 } @@ -462,7 +462,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -494,7 +494,7 @@ Rectangle { anchors.centerIn: parent name: "refresh" size: 48 - color: Qt.rgba(Theme.surfaceText.r || 0.8, Theme.surfaceText.g || 0.8, Theme.surfaceText.b || 0.8, 0.3) + color: Theme.surfaceTextAlpha smoothTransform: wifiScanningOverlay.visible RotationAnimator on rotation { @@ -678,7 +678,7 @@ Rectangle { width: pinWifiRow.width + Theme.spacingS * 2 height: pinWifiRow.implicitHeight + Theme.spacingXS * 2 radius: height / 2 - color: wifiDelegate.isPinned ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05) + color: wifiDelegate.isPinned ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceText, 0.05) Row { id: pinWifiRow @@ -796,7 +796,7 @@ Rectangle { color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.width: 0 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: Theme.outlineStrong } MenuItem { @@ -813,7 +813,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -837,7 +837,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -862,7 +862,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -885,7 +885,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.08) : "transparent" + color: parent.hovered ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) radius: Theme.cornerRadius / 2 } diff --git a/quickshell/Modules/ControlCenter/Widgets/AudioSliderRow.qml b/quickshell/Modules/ControlCenter/Widgets/AudioSliderRow.qml index 9632a6810..b530e25dc 100644 --- a/quickshell/Modules/ControlCenter/Widgets/AudioSliderRow.qml +++ b/quickshell/Modules/ControlCenter/Widgets/AudioSliderRow.qml @@ -21,7 +21,7 @@ Row { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: (Theme.iconSize + Theme.spacingS * 2) / 2 - color: iconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.primary, 0) + color: iconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primary, 0) DankRipple { id: iconRipple diff --git a/quickshell/Modules/ControlCenter/Widgets/BrightnessSliderRow.qml b/quickshell/Modules/ControlCenter/Widgets/BrightnessSliderRow.qml index 4d5eb0088..bb0e904d1 100644 --- a/quickshell/Modules/ControlCenter/Widgets/BrightnessSliderRow.qml +++ b/quickshell/Modules/ControlCenter/Widgets/BrightnessSliderRow.qml @@ -94,7 +94,7 @@ Row { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: (Theme.iconSize + Theme.spacingS * 2) / 2 - color: iconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.primary, 0) + color: iconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primary, 0) DankRipple { id: iconRipple diff --git a/quickshell/Modules/ControlCenter/Widgets/CompoundPill.qml b/quickshell/Modules/ControlCenter/Widgets/CompoundPill.qml index f99bef5cc..34b1e416c 100644 --- a/quickshell/Modules/ControlCenter/Widgets/CompoundPill.qml +++ b/quickshell/Modules/ControlCenter/Widgets/CompoundPill.qml @@ -47,7 +47,7 @@ Rectangle { return Theme.ccTileInactiveBg; } readonly property color _tileRingActive: Theme.ccTileRing - readonly property color _tileRingInactive: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.18) + readonly property color _tileRingInactive: Theme.outlineHeavy readonly property color _tileIconActive: Theme.ccTileActiveText readonly property color _tileIconInactive: Theme.ccTileInactiveIcon diff --git a/quickshell/Modules/ControlCenter/Widgets/DiskUsagePill.qml b/quickshell/Modules/ControlCenter/Widgets/DiskUsagePill.qml index bf6f6953d..0dd2f46bf 100644 --- a/quickshell/Modules/ControlCenter/Widgets/DiskUsagePill.qml +++ b/quickshell/Modules/ControlCenter/Widgets/DiskUsagePill.qml @@ -56,7 +56,7 @@ CompoundPill { iconColor: { if (!DgopService.dgopAvailable || !selectedMount) { - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5); + return Theme.surfaceTextSecondary; } if (usagePercent > 90) { return Theme.error; diff --git a/quickshell/Modules/ControlCenter/Widgets/ErrorPill.qml b/quickshell/Modules/ControlCenter/Widgets/ErrorPill.qml index cece4671c..de5c8ddf5 100644 --- a/quickshell/Modules/ControlCenter/Widgets/ErrorPill.qml +++ b/quickshell/Modules/ControlCenter/Widgets/ErrorPill.qml @@ -12,7 +12,7 @@ StyledRect { property string secondaryMessage: "" radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.1) + color: Theme.warningHover border.color: Theme.warning border.width: 1 diff --git a/quickshell/Modules/ControlCenter/Widgets/InputAudioSliderRow.qml b/quickshell/Modules/ControlCenter/Widgets/InputAudioSliderRow.qml index fdc9fbbb1..7ec37bb0e 100644 --- a/quickshell/Modules/ControlCenter/Widgets/InputAudioSliderRow.qml +++ b/quickshell/Modules/ControlCenter/Widgets/InputAudioSliderRow.qml @@ -21,7 +21,7 @@ Row { height: Theme.iconSize + Theme.spacingS * 2 anchors.verticalCenter: parent.verticalCenter radius: (Theme.iconSize + Theme.spacingS * 2) / 2 - color: iconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.primary, 0) + color: iconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primary, 0) DankRipple { id: iconRipple diff --git a/quickshell/Modules/DankBar/DankBarContent.qml b/quickshell/Modules/DankBar/DankBarContent.qml index 5da210ba3..5dfda2c20 100644 --- a/quickshell/Modules/DankBar/DankBarContent.qml +++ b/quickshell/Modules/DankBar/DankBarContent.qml @@ -1470,7 +1470,7 @@ Item { Rectangle { anchors.fill: parent color: "transparent" - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + border.color: Theme.outlineStrong border.width: 1 radius: 2 visible: false diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index 4d1366669..957d1aa65 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -299,7 +299,7 @@ PanelWindow { readonly property color _surfaceContainer: Theme.surfaceContainer readonly property string _barId: barConfig?.id ?? "default" property real _backgroundAlpha: barConfig?.transparency ?? 1.0 - readonly property color _bgColor: (SettingsData.frameEnabled && usesFrameBarChrome) ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha) + readonly property color _bgColor: (SettingsData.frameEnabled && usesFrameBarChrome) ? Theme.withAlpha(SettingsData.effectiveFrameColor, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha) function _updateBackgroundAlpha() { const live = SettingsData.barConfigs.find(c => c.id === _barId); diff --git a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml b/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml index 0e02c978c..b8e096345 100644 --- a/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml +++ b/quickshell/Modules/DankBar/Popouts/BatteryPopout.qml @@ -255,7 +255,7 @@ DankPopout { width: 32 height: 32 radius: 16 - color: closeBatteryArea.containsMouse ? Theme.errorHover : "transparent" + color: closeBatteryArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.top: parent.top DankIcon { @@ -579,8 +579,8 @@ DankPopout { width: parent.width height: degradationContent.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) - border.color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3) + color: Theme.errorHover + border.color: Theme.errorSelected border.width: 0 visible: (typeof PowerProfiles !== "undefined") && PowerProfiles.degradationReason !== PerformanceDegradationReason.None @@ -618,7 +618,7 @@ DankPopout { StyledText { text: (typeof PowerProfiles !== "undefined") ? PerformanceDegradationReason.toString(PowerProfiles.degradationReason) : "" font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.8) + color: Theme.withAlpha(Theme.error, 0.8) wrapMode: Text.WordWrap width: parent.width } diff --git a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml b/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml index 344f6fb90..d67d48699 100644 --- a/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml +++ b/quickshell/Modules/DankBar/Popouts/DWLLayoutPopout.qml @@ -183,7 +183,7 @@ DankPopout { width: 32 height: 32 radius: 16 - color: closeLayoutArea.containsMouse ? Theme.errorHover : "transparent" + color: closeLayoutArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.top: parent.top DankIcon { @@ -228,7 +228,7 @@ DankPopout { width: parent.width height: 40 radius: Theme.cornerRadius - color: layoutArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency) : "transparent" + color: layoutArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHighest, 0) Row { anchors.left: parent.left diff --git a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml b/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml index 7f7011f2e..e03a20583 100644 --- a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml +++ b/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml @@ -282,7 +282,7 @@ DankPopout { anchors.topMargin: Theme.spacingM anchors.bottomMargin: Theme.spacingM radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.1) + color: Theme.surfaceLight StyledText { id: statusText @@ -321,7 +321,7 @@ DankPopout { width: ListView.view.width height: 48 radius: Theme.cornerRadius - color: packageMouseArea.containsMouse ? Theme.primaryHoverLight : "transparent" + color: packageMouseArea.containsMouse ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) required property var modelData @@ -338,7 +338,7 @@ DankPopout { width: 64 height: 18 radius: 9 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.18) + color: Theme.primaryPressed StyledText { anchors.centerIn: parent diff --git a/quickshell/Modules/DankBar/Widgets/AppsDock.qml b/quickshell/Modules/DankBar/Widgets/AppsDock.qml index 3749a15a5..03f84f552 100644 --- a/quickshell/Modules/DankBar/Widgets/AppsDock.qml +++ b/quickshell/Modules/DankBar/Widgets/AppsDock.qml @@ -534,7 +534,7 @@ BasePill { visible: isSeparator width: root.isVerticalOrientation ? root.barThickness * 0.6 : 2 height: root.isVerticalOrientation ? 2 : root.barThickness * 0.6 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3) + color: Theme.outlineHeavy radius: 1 anchors.centerIn: parent } @@ -631,7 +631,7 @@ BasePill { if (appItem.isFocused && colorizeEnabled) { return mouseArea.containsMouse ? Theme.withAlpha(Qt.lighter(appItem.activeOverlayColor, 1.3), 0.4) : Theme.withAlpha(appItem.activeOverlayColor, 0.3); } - return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent"; + return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0); } border.width: dragHandler.dragging ? 2 : 0 diff --git a/quickshell/Modules/DankBar/Widgets/AppsDockContextMenu.qml b/quickshell/Modules/DankBar/Widgets/AppsDockContextMenu.qml index bc9058414..6aabf970e 100644 --- a/quickshell/Modules/DankBar/Widgets/AppsDockContextMenu.qml +++ b/quickshell/Modules/DankBar/Widgets/AppsDockContextMenu.qml @@ -121,7 +121,7 @@ PanelWindow { height: Math.max(60, menuColumn.implicitHeight + Theme.spacingS * 2) color: Theme.floatingSurface radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: root.visible ? 1 : 0 @@ -174,7 +174,7 @@ PanelWindow { width: parent.width height: 28 radius: Theme.cornerRadius - color: windowArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: windowArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) StyledText { anchors.left: parent.left @@ -198,7 +198,7 @@ PanelWindow { width: 20 height: 20 radius: 10 - color: closeMouseArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.2) : "transparent" + color: closeMouseArea.containsMouse ? Theme.errorPressed : Theme.withAlpha(Theme.errorPressed, 0) DankIcon { anchors.centerIn: parent @@ -254,7 +254,7 @@ PanelWindow { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Repeater { @@ -264,7 +264,7 @@ PanelWindow { width: parent.width height: 28 radius: Theme.cornerRadius - color: actionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: actionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.left: parent.left @@ -331,7 +331,7 @@ PanelWindow { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Rectangle { @@ -339,7 +339,7 @@ PanelWindow { width: parent.width height: 28 radius: Theme.cornerRadius - color: pinArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: pinArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) StyledText { anchors.left: parent.left @@ -391,7 +391,7 @@ PanelWindow { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Rectangle { @@ -399,7 +399,7 @@ PanelWindow { width: parent.width height: 28 radius: Theme.cornerRadius - color: nvidiaArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: nvidiaArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) StyledText { anchors.left: parent.left @@ -441,7 +441,7 @@ PanelWindow { width: parent.width height: 28 radius: Theme.cornerRadius - color: closeArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) : "transparent" + color: closeArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) StyledText { anchors.left: parent.left diff --git a/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml b/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml index 82c78d062..7aceb1a98 100644 --- a/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml +++ b/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml @@ -19,7 +19,7 @@ Item { width: root.iconSize height: root.iconSize radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, mouseArea.containsMouse ? 0.2 : 0.1) + color: Theme.withAlpha(Theme.primary, mouseArea.containsMouse ? 0.2 : 0.1) Behavior on color { ColorAnimation { diff --git a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml index e970662ff..1ed21fd6f 100644 --- a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml +++ b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml @@ -197,7 +197,7 @@ BasePill { height: Math.max(64, menuColumn.implicitHeight + Theme.spacingS * 2) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: contextMenuWindow.visible ? 1 : 0 @@ -234,7 +234,7 @@ BasePill { width: parent.width height: 30 radius: Theme.cornerRadius - color: clearAllArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: clearAllArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.fill: parent @@ -274,7 +274,7 @@ BasePill { width: parent.width height: 30 radius: Theme.cornerRadius - color: savedItemsArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: savedItemsArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.fill: parent diff --git a/quickshell/Modules/DankBar/Widgets/Media.qml b/quickshell/Modules/DankBar/Widgets/Media.qml index a1f7f05ee..8085e36cf 100644 --- a/quickshell/Modules/DankBar/Widgets/Media.qml +++ b/quickshell/Modules/DankBar/Widgets/Media.qml @@ -447,7 +447,7 @@ BasePill { height: 20 radius: 10 anchors.verticalCenter: parent.verticalCenter - color: prevArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: prevArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) visible: root.playerAvailable opacity: (activePlayer && activePlayer.canGoPrevious) ? 1 : 0.3 @@ -500,7 +500,7 @@ BasePill { height: 20 radius: 10 anchors.verticalCenter: parent.verticalCenter - color: nextArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: nextArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) visible: playerAvailable opacity: (activePlayer && activePlayer.canGoNext) ? 1 : 0.3 diff --git a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml index d0de07536..cfac2d759 100644 --- a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml +++ b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml @@ -271,7 +271,7 @@ BasePill { height: Math.max(60, menuColumn.implicitHeight + Theme.spacingS * 2) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: contextMenuWindow.visible ? 1 : 0 @@ -312,7 +312,7 @@ BasePill { width: parent.width height: 30 radius: Theme.cornerRadius - color: tabArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: tabArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.fill: parent @@ -354,7 +354,7 @@ BasePill { width: parent.width height: 30 radius: Theme.cornerRadius - color: newNoteArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: newNoteArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.fill: parent diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index 08d791486..cb0c1706e 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -286,7 +286,7 @@ BasePill { if (isFocused) { return mouseArea.containsMouse ? Theme.primarySelected : Theme.withAlpha(Theme.primary, 0.45); } - return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent"; + return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0); } // App icon @@ -530,7 +530,7 @@ BasePill { if (isFocused) { return mouseArea.containsMouse ? Theme.primarySelected : Theme.withAlpha(Theme.primary, 0.45); } - return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent"; + return mouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0); } IconImage { @@ -861,12 +861,12 @@ BasePill { color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.width: BlurService.enabled ? BlurService.borderWidth : 1 - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineStrong Rectangle { anchors.fill: parent radius: parent.radius - color: closeMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: closeMouseArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) } StyledText { diff --git a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml index 1a379f650..c6345bcb2 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml @@ -507,7 +507,7 @@ BasePill { height: root.trayItemSize anchors.centerIn: parent radius: Theme.cornerRadius - color: trayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: trayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) border.width: dragHandler.dragging ? 2 : 0 border.color: Theme.primary opacity: dragHandler.dragging ? 0.8 : 1.0 @@ -640,7 +640,7 @@ BasePill { height: root.trayItemSize anchors.centerIn: parent radius: Theme.cornerRadius - color: caretArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: caretArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) DankIcon { anchors.centerIn: parent @@ -713,7 +713,7 @@ BasePill { x: root.isVerticalOrientation ? Math.round((parent.width - width) / 2) : (root.reverseInlineHorizontal ? parent.width - width : 0) y: root.isVerticalOrientation ? (root.reverseInlineVertical ? parent.height - height : 0) : Math.round((parent.height - height) / 2) radius: Theme.cornerRadius - color: inlineTrayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: inlineTrayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) opacity: root.inlineExpanded ? 1 : 0 Behavior on opacity { @@ -833,7 +833,7 @@ BasePill { height: root.trayItemSize anchors.centerIn: parent radius: Theme.cornerRadius - color: trayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: trayItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) border.width: dragHandler.dragging ? 2 : 0 border.color: Theme.primary opacity: dragHandler.dragging ? 0.8 : 1.0 @@ -983,7 +983,7 @@ BasePill { height: root.trayItemSize anchors.centerIn: parent radius: Theme.cornerRadius - color: caretAreaVert.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: caretAreaVert.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) DankIcon { anchors.centerIn: parent @@ -1911,7 +1911,7 @@ BasePill { visible: entryStack.count === 0 width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Rectangle { @@ -1955,7 +1955,7 @@ BasePill { visible: entryStack.count > 0 width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Repeater { @@ -1969,7 +1969,7 @@ BasePill { radius: menuEntry?.isSeparator ? 0 : Theme.cornerRadius color: { if (menuEntry?.isSeparator) - return Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2); + return Theme.outlineHeavy; return itemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(Theme.surfaceContainer, 0); } diff --git a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml index cbbcd22d6..7bedb9e12 100644 --- a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml @@ -831,7 +831,7 @@ Item { const baseColor = Theme.widgetBaseBackgroundColor; const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0; if (Theme.widgetBackgroundHasAlpha) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency); + return Theme.blendAlpha(baseColor, transparency); } return Theme.withAlpha(baseColor, transparency); } @@ -1463,7 +1463,7 @@ Item { radius: Theme.cornerRadius color: "transparent" border.width: (delegateRoot.focusedBorderEnabledForMonitor && isActive && !isPlaceholder) ? delegateRoot.focusedBorderThicknessForMonitor : 0 - border.color: (delegateRoot.focusedBorderEnabledForMonitor && isActive && !isPlaceholder) ? focusedBorderColor : "transparent" + border.color: (delegateRoot.focusedBorderEnabledForMonitor && isActive && !isPlaceholder) ? focusedBorderColor : Theme.withAlpha(focusedBorderColor, 0) Behavior on width { NumberAnimation { @@ -1505,7 +1505,7 @@ Item { opacity: dragHandler.dragging ? 0.8 : 1.0 border.width: dragHandler.dragging ? 2 : (isUrgent ? 2 : (isDropTarget ? 2 : 0)) - border.color: dragHandler.dragging ? Theme.primary : (isUrgent ? urgentColor : (isDropTarget ? Theme.primary : "transparent")) + border.color: dragHandler.dragging ? Theme.primary : (isUrgent ? urgentColor : (isDropTarget ? Theme.primary : Theme.withAlpha(Theme.primary, 0))) transform: Translate { x: root.isVertical ? 0 : (dragHandler.dragging ? dragHandler.dragAxisOffset : 0) @@ -1585,7 +1585,7 @@ Item { anchors.verticalCenter: parent.verticalCenter name: loadedIconData?.value ?? "" size: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium weight: (isActive && !isPlaceholder) ? 500 : 400 } } @@ -1599,7 +1599,7 @@ Item { id: wsText anchors.verticalCenter: parent.verticalCenter text: loadedIconData?.value ?? "" - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal } @@ -1614,7 +1614,7 @@ Item { id: wsIndexText anchors.verticalCenter: parent.verticalCenter text: loadedHasIcon ? (modelData?.name ?? "") : root.getWorkspaceIndex(modelData, index) - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal } @@ -1767,7 +1767,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter name: loadedIconData?.value ?? "" size: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium weight: (isActive && !isPlaceholder) ? 500 : 400 } @@ -1775,7 +1775,7 @@ Item { visible: loadedHasIcon && loadedIconData?.type === "text" anchors.horizontalCenter: parent.horizontalCenter text: loadedIconData?.value ?? "" - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal } @@ -1784,7 +1784,7 @@ Item { visible: ((SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon) || (loadedHasIcon && SettingsData.showWorkspaceName && hasWorkspaceName) anchors.horizontalCenter: parent.horizontalCenter text: loadedHasIcon ? (root.isVertical ? (modelData?.name ?? "").charAt(0) : (modelData?.name ?? "")) : root.getWorkspaceIndex(modelData, index) - color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium + color: (isActive || isUrgent) ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText) font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal } diff --git a/quickshell/Modules/DankDash/MediaDropdownOverlay.qml b/quickshell/Modules/DankDash/MediaDropdownOverlay.qml index 43edbf22b..2f29fff5a 100644 --- a/quickshell/Modules/DankDash/MediaDropdownOverlay.qml +++ b/quickshell/Modules/DankDash/MediaDropdownOverlay.qml @@ -317,8 +317,8 @@ Item { width: parent.width height: 48 radius: Theme.cornerRadius - color: deviceMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.nestedSurface - border.color: modelData === AudioService.sink ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: deviceMouseArea.containsMouse ? Theme.primaryHover : Theme.nestedSurface + border.color: modelData === AudioService.sink ? Theme.primary : Theme.outlineHeavy border.width: modelData === AudioService.sink ? 2 : 1 Row { @@ -509,8 +509,8 @@ Item { width: parent.width height: 48 radius: Theme.cornerRadius - color: playerMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.nestedSurface - border.color: modelData === activePlayer ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: playerMouseArea.containsMouse ? Theme.primaryHover : Theme.nestedSurface + border.color: modelData === activePlayer ? Theme.primary : Theme.outlineHeavy border.width: modelData === activePlayer ? 2 : 1 Row { diff --git a/quickshell/Modules/DankDash/MediaPlayerTab.qml b/quickshell/Modules/DankDash/MediaPlayerTab.qml index abe0849f6..5633db162 100644 --- a/quickshell/Modules/DankDash/MediaPlayerTab.qml +++ b/quickshell/Modules/DankDash/MediaPlayerTab.qml @@ -360,14 +360,14 @@ Item { DankIcon { name: "music_note" size: Theme.iconSize * 3 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary anchors.horizontalCenter: parent.horizontalCenter } StyledText { text: I18n.tr("No Active Players") font.pixelSize: Theme.fontSizeLarge - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } } @@ -425,7 +425,7 @@ Item { StyledText { text: activePlayer?.trackArtist || I18n.tr("Unknown Artist") font.pixelSize: Theme.fontSizeMedium - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.8) + color: Theme.surfaceTextMedium width: parent.width horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight @@ -436,7 +436,7 @@ Item { StyledText { text: activePlayer?.trackAlbum || "" font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary width: parent.width horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight @@ -531,7 +531,7 @@ Item { height: 40 radius: 20 anchors.centerIn: parent - color: shuffleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: shuffleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -564,7 +564,7 @@ Item { height: 40 radius: 20 anchors.centerIn: parent - color: prevBtnArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent" + color: prevBtnArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0) DankIcon { anchors.centerIn: parent @@ -633,7 +633,7 @@ Item { height: 40 radius: 20 anchors.centerIn: parent - color: nextBtnArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent" + color: nextBtnArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0) DankIcon { anchors.centerIn: parent @@ -663,7 +663,7 @@ Item { height: 40 radius: 20 anchors.centerIn: parent - color: repeatArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: repeatArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -719,7 +719,7 @@ Item { radius: 20 x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM y: 185 - color: playerSelectorArea.containsMouse || playersExpanded ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent" + color: playerSelectorArea.containsMouse || playersExpanded ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) border.color: Theme.outlineStrong border.width: 1 z: 100 @@ -786,7 +786,7 @@ Item { radius: 20 x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM y: 130 - color: volumeButtonArea.containsMouse && volumeAvailable || volumeExpanded ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent" + color: volumeButtonArea.containsMouse && volumeAvailable || volumeExpanded ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) border.color: volumeAvailable ? Theme.outlineStrong : Theme.outlineMedium border.width: 1 z: 101 @@ -798,7 +798,7 @@ Item { anchors.centerIn: parent name: getVolumeIcon() size: 18 - color: volumeAvailable && currentVolume > 0 ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, volumeAvailable ? 1.0 : 0.5) + color: volumeAvailable && currentVolume > 0 ? Theme.primary : Theme.withAlpha(Theme.surfaceText, volumeAvailable ? 1.0 : 0.5) } MouseArea { @@ -849,7 +849,7 @@ Item { radius: 20 x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM y: 240 - color: audioDevicesArea.containsMouse || devicesExpanded ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent" + color: audioDevicesArea.containsMouse || devicesExpanded ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) border.color: Theme.outlineStrong border.width: 1 z: 100 diff --git a/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml b/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml index d908a39ac..e356d2c8b 100644 --- a/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml +++ b/quickshell/Modules/DankDash/Overview/CalendarOverviewCard.qml @@ -228,8 +228,8 @@ Rectangle { visible: CalendarService && CalendarService.dankNeedsLaunch height: visible ? Math.max(28, warningRow.implicitHeight) + Theme.spacingS : 0 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) - border.color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.35) + color: Theme.warningHover + border.color: Theme.withAlpha(Theme.warning, 0.35) border.width: 1 Row { @@ -283,7 +283,7 @@ Rectangle { anchors.left: parent.left anchors.leftMargin: Theme.spacingS radius: Theme.cornerRadius - color: backButtonArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: backButtonArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -309,7 +309,7 @@ Rectangle { anchors.rightMargin: Theme.spacingS radius: Theme.cornerRadius visible: CalendarService && CalendarService.canCreateEvents - color: addEventArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: addEventArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -362,7 +362,7 @@ Rectangle { width: 28 height: 28 radius: Theme.cornerRadius - color: prevMonthArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: prevMonthArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -400,7 +400,7 @@ Rectangle { width: 28 height: 28 radius: Theme.cornerRadius - color: todayArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: todayArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -422,7 +422,7 @@ Rectangle { width: 28 height: 28 radius: Theme.cornerRadius - color: nextMonthArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: nextMonthArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) DankIcon { anchors.centerIn: parent @@ -485,7 +485,7 @@ Rectangle { return root.getWeekNumber(rowDate); } font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium } } @@ -522,7 +522,7 @@ Rectangle { anchors.centerIn: parent text: modelData font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium } } @@ -565,16 +565,16 @@ Rectangle { anchors.centerIn: parent width: Math.min(parent.width - 4, parent.height - 4, 32) height: width - color: isToday ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : dayArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: isToday ? Theme.primaryHover : dayArea.containsMouse ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius - border.color: (isSelected && !isToday) ? Theme.primary : "transparent" + border.color: (isSelected && !isToday) ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: (isSelected && !isToday) ? 1 : 0 StyledText { anchors.centerIn: parent text: dayDate.getDate() font.pixelSize: Theme.fontSizeSmall - color: isToday ? Theme.primary : isCurrentMonth ? Theme.surfaceText : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: isToday ? Theme.primary : isCurrentMonth ? Theme.surfaceText : Theme.onSurface_38 font.weight: isToday ? Font.Medium : Font.Normal } @@ -817,13 +817,13 @@ Rectangle { readonly property bool isTask: modelData && modelData.id && modelData.id.startsWith("task_") readonly property color accentColor: { if (isTask) - return modelData.completed ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Theme.primary; + return modelData.completed ? Theme.withAlpha(Theme.primary, 0.4) : Theme.primary; return (modelData && modelData.color && modelData.color.length) ? modelData.color : Theme.primary; } - readonly property color surfaceColor: isDragging ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) : (eventMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.06) : Theme.nestedSurface) + readonly property color surfaceColor: isDragging ? Theme.primaryPressed : (eventMouseArea.containsMouse ? Theme.primaryBackground : Theme.nestedSurface) color: surfaceColor - border.color: isDragging ? Theme.primary : (eventMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) : Theme.outlineMedium) + border.color: isDragging ? Theme.primary : (eventMouseArea.containsMouse ? Theme.primaryPressed : Theme.outlineMedium) border.width: (isDragging || eventMouseArea.containsMouse) ? 1 : Theme.layerOutlineWidth scale: isDragging ? 1.02 : 1.0 @@ -894,7 +894,7 @@ Rectangle { anchors.centerIn: parent name: "drag_indicator" size: 14 - color: dragMouseArea.containsMouse ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3) + color: dragMouseArea.containsMouse ? Theme.primary : Theme.surfaceTextAlpha } MouseArea { @@ -953,7 +953,7 @@ Rectangle { anchors.centerIn: parent name: (modelData && modelData.completed) ? "check_box" : "check_box_outline_blank" size: 16 - color: (modelData && modelData.completed) ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: (modelData && modelData.completed) ? Theme.primary : Theme.onSurface_38 } } @@ -972,7 +972,7 @@ Rectangle { width: parent.width text: modelData ? modelData.title : "" font.pixelSize: Theme.fontSizeSmall - color: (modelData && modelData.id && modelData.id.startsWith("task_") && modelData.completed) ? Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) : Theme.surfaceText + color: (modelData && modelData.id && modelData.id.startsWith("task_") && modelData.completed) ? Theme.surfaceTextSecondary : Theme.surfaceText font.weight: Font.Medium horizontalAlignment: Text.AlignLeft elide: Text.ElideRight @@ -997,7 +997,7 @@ Rectangle { return ""; } font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.weight: Font.Normal horizontalAlignment: Text.AlignLeft visible: text !== "" && modelData && modelData.id && !modelData.id.startsWith("task_") @@ -1071,14 +1071,14 @@ Rectangle { anchors.rightMargin: Theme.spacingS anchors.verticalCenter: parent.verticalCenter radius: Theme.cornerRadius - color: deleteMouseArea.containsMouse ? (taskItem.isEditing ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Qt.rgba(0.9, 0.2, 0.2, 0.15)) : "transparent" + color: deleteMouseArea.containsMouse ? (taskItem.isEditing ? Theme.primaryHover : Qt.rgba(0.9, 0.2, 0.2, 0.15)) : Theme.withAlpha(Qt.rgba(0.9, 0.2, 0.2, 0.15), 0) visible: modelData && modelData.id && modelData.id.startsWith("task_") DankIcon { anchors.centerIn: parent name: taskItem.isEditing ? "close" : "delete" size: 14 - color: deleteMouseArea.containsMouse ? (taskItem.isEditing ? Theme.primary : Qt.rgba(0.9, 0.2, 0.2, 1.0)) : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: deleteMouseArea.containsMouse ? (taskItem.isEditing ? Theme.primary : Qt.rgba(0.9, 0.2, 0.2, 1.0)) : Theme.onSurface_38 } MouseArea { @@ -1105,14 +1105,14 @@ Rectangle { anchors.rightMargin: Theme.spacingXS anchors.verticalCenter: parent.verticalCenter radius: Theme.cornerRadius - color: editMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: editMouseArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) visible: modelData && modelData.id && modelData.id.startsWith("task_") DankIcon { anchors.centerIn: parent name: taskItem.isEditing ? "check" : "edit" size: 14 - color: editMouseArea.containsMouse ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: editMouseArea.containsMouse ? Theme.primary : Theme.onSurface_38 } MouseArea { @@ -1161,7 +1161,7 @@ Rectangle { Text { text: I18n.tr("Add a task...", "placeholder in the new-task input field") - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: Theme.onSurface_38 visible: taskInput.text.length === 0 font.pixelSize: Theme.fontSizeSmall anchors.verticalCenter: parent.verticalCenter diff --git a/quickshell/Modules/DankDash/Overview/ClockCard.qml b/quickshell/Modules/DankDash/Overview/ClockCard.qml index f09146d35..c9ebdf4d3 100644 --- a/quickshell/Modules/DankDash/Overview/ClockCard.qml +++ b/quickshell/Modules/DankDash/Overview/ClockCard.qml @@ -85,7 +85,7 @@ Card { StyledText { text: String(systemClock?.date?.getSeconds()).padStart(2, '0') font.pixelSize: 24 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.7) + color: Theme.withAlpha(Theme.primary, 0.7) font.weight: Font.Medium horizontalAlignment: Text.AlignHCenter } @@ -100,7 +100,7 @@ Card { StyledText { text: systemClock?.date?.toLocaleDateString(I18n.locale(), "MMM dd") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml b/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml index e105e148f..648e3ebdf 100644 --- a/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml +++ b/quickshell/Modules/DankDash/Overview/MediaOverviewCard.qml @@ -48,14 +48,14 @@ Card { DankIcon { name: "music_note" size: Theme.iconSize - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary anchors.horizontalCenter: parent.horizontalCenter } StyledText { text: I18n.tr("No Media") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } } @@ -101,7 +101,7 @@ Card { StyledText { text: activePlayer?.trackArtist || I18n.tr("Unknown Artist") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium width: parent.width elide: Text.ElideRight maximumLineCount: 1 @@ -131,7 +131,7 @@ Card { height: 28 radius: 14 anchors.verticalCenter: playPauseButton.verticalCenter - color: prevArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent" + color: prevArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0) DankIcon { anchors.centerIn: parent @@ -176,7 +176,7 @@ Card { height: 28 radius: 14 anchors.verticalCenter: playPauseButton.verticalCenter - color: nextArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : "transparent" + color: nextArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.withAlpha(Theme.surfaceContainerHigh, 0) DankIcon { anchors.centerIn: parent diff --git a/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml b/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml index cb7089bcf..8ec424831 100644 --- a/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml +++ b/quickshell/Modules/DankDash/Overview/SystemMonitorCard.qml @@ -1,5 +1,4 @@ import QtQuick -import QtQuick.Effects import qs.Common import qs.Services import qs.Widgets @@ -8,10 +7,10 @@ Card { id: root Component.onCompleted: { - DgopService.addRef(["cpu", "memory", "system"]) + DgopService.addRef(["cpu", "memory", "system"]); } Component.onDestruction: { - DgopService.removeRef(["cpu", "memory", "system"]) + DgopService.removeRef(["cpu", "memory", "system"]); } Row { @@ -30,7 +29,7 @@ Card { height: parent.height - Theme.iconSizeSmall - Theme.spacingS radius: 4 anchors.horizontalCenter: parent.horizontalCenter - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy Rectangle { width: parent.width @@ -39,9 +38,11 @@ Card { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter color: { - if (DgopService.cpuUsage > 80) return Theme.error - if (DgopService.cpuUsage > 60) return Theme.warning - return Theme.primary + if (DgopService.cpuUsage > 80) + return Theme.error; + if (DgopService.cpuUsage > 60) + return Theme.warning; + return Theme.primary; } Behavior on height { @@ -63,9 +64,11 @@ Card { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom color: { - if (DgopService.cpuUsage > 80) return Theme.error - if (DgopService.cpuUsage > 60) return Theme.warning - return Theme.primary + if (DgopService.cpuUsage > 80) + return Theme.error; + if (DgopService.cpuUsage > 60) + return Theme.warning; + return Theme.primary; } } } @@ -82,7 +85,7 @@ Card { height: parent.height - Theme.iconSizeSmall - Theme.spacingS radius: 4 anchors.horizontalCenter: parent.horizontalCenter - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy Rectangle { width: parent.width @@ -91,9 +94,11 @@ Card { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter color: { - if (DgopService.cpuTemperature > 85) return Theme.error - if (DgopService.cpuTemperature > 69) return Theme.warning - return Theme.primary + if (DgopService.cpuTemperature > 85) + return Theme.error; + if (DgopService.cpuTemperature > 69) + return Theme.warning; + return Theme.primary; } Behavior on height { @@ -115,9 +120,11 @@ Card { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom color: { - if (DgopService.cpuTemperature > 85) return Theme.error - if (DgopService.cpuTemperature > 69) return Theme.warning - return Theme.primary + if (DgopService.cpuTemperature > 85) + return Theme.error; + if (DgopService.cpuTemperature > 69) + return Theme.warning; + return Theme.primary; } } } @@ -134,7 +141,7 @@ Card { height: parent.height - Theme.iconSizeSmall - Theme.spacingS radius: 4 anchors.horizontalCenter: parent.horizontalCenter - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy Rectangle { width: parent.width @@ -143,9 +150,11 @@ Card { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter color: { - if (DgopService.memoryUsage > 90) return Theme.error - if (DgopService.memoryUsage > 75) return Theme.warning - return Theme.primary + if (DgopService.memoryUsage > 90) + return Theme.error; + if (DgopService.memoryUsage > 75) + return Theme.warning; + return Theme.primary; } Behavior on height { @@ -167,9 +176,11 @@ Card { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom color: { - if (DgopService.memoryUsage > 90) return Theme.error - if (DgopService.memoryUsage > 75) return Theme.warning - return Theme.primary + if (DgopService.memoryUsage > 90) + return Theme.error; + if (DgopService.memoryUsage > 75) + return Theme.warning; + return Theme.primary; } } } diff --git a/quickshell/Modules/DankDash/Overview/UserInfoCard.qml b/quickshell/Modules/DankDash/Overview/UserInfoCard.qml index 4893ee437..af7c7bb2a 100644 --- a/quickshell/Modules/DankDash/Overview/UserInfoCard.qml +++ b/quickshell/Modules/DankDash/Overview/UserInfoCard.qml @@ -78,7 +78,7 @@ Card { return ""; } font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.8) + color: Theme.surfaceTextMedium anchors.verticalCenter: parent.verticalCenter elide: Text.ElideRight width: parent.parent.parent.parent.width - avatarContainer.width - Theme.spacingM * 3 - 16 - Theme.spacingS @@ -100,7 +100,7 @@ Card { StyledText { text: DgopService.shortUptime ? I18n.tr("up", "uptime prefix, e.g. 'up 4h 2m'") + DgopService.shortUptime.slice(2) : I18n.tr("up", "uptime prefix, e.g. 'up 4h 2m'") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.verticalCenter: parent.verticalCenter } } diff --git a/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml b/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml index d1cfdfa38..618926459 100644 --- a/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml +++ b/quickshell/Modules/DankDash/Overview/WeatherOverviewCard.qml @@ -29,7 +29,7 @@ Card { DankIcon { name: "cloud_off" size: 24 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary visible: !WeatherService.weather.loading anchors.horizontalCenter: parent.horizontalCenter } @@ -37,7 +37,7 @@ Card { StyledText { text: I18n.tr("No Weather") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium visible: !WeatherService.weather.loading anchors.horizontalCenter: parent.horizontalCenter } @@ -85,7 +85,7 @@ Card { StyledText { text: WeatherService.getWeatherCondition(WeatherService.weather.wCode) font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium elide: Text.ElideRight width: parent.parent.parent.width - 48 - Theme.spacingL * 2 horizontalAlignment: Text.AlignLeft diff --git a/quickshell/Modules/DankDash/WallpaperTab.qml b/quickshell/Modules/DankDash/WallpaperTab.qml index be1b374bd..0bf30db22 100644 --- a/quickshell/Modules/DankDash/WallpaperTab.qml +++ b/quickshell/Modules/DankDash/WallpaperTab.qml @@ -537,7 +537,7 @@ Item { Rectangle { anchors.fill: parent - color: isSelected ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) : "transparent" + color: isSelected ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) radius: parent.radius Behavior on color { @@ -658,7 +658,8 @@ Item { sortMenu.visible = false; pageJumpPopup.visible = !pageJumpPopup.visible; } - onEntered: if (enabled) pageJumpTooltip.show(I18n.tr("Jump to page"), pageIndicator, 0, 0, "top") + onEntered: if (enabled) + pageJumpTooltip.show(I18n.tr("Jump to page"), pageIndicator, 0, 0, "top") onExited: pageJumpTooltip.hide() } diff --git a/quickshell/Modules/DankDash/WeatherForecastCard.qml b/quickshell/Modules/DankDash/WeatherForecastCard.qml index b163e88e1..2cb8ad746 100644 --- a/quickshell/Modules/DankDash/WeatherForecastCard.qml +++ b/quickshell/Modules/DankDash/WeatherForecastCard.qml @@ -104,7 +104,7 @@ Rectangle { ] color: isCurrent ? Theme.withAlpha(Theme.primary, 0.1) : Theme.nestedSurface - border.color: isCurrent ? Theme.withAlpha(Theme.primary, 0.3) : "transparent" + border.color: isCurrent ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.primary, 0) border.width: isCurrent ? 1 : 0 Column { diff --git a/quickshell/Modules/DankDash/WeatherTab.qml b/quickshell/Modules/DankDash/WeatherTab.qml index 9fd64a735..28fe270a8 100644 --- a/quickshell/Modules/DankDash/WeatherTab.qml +++ b/quickshell/Modules/DankDash/WeatherTab.qml @@ -512,7 +512,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right enabled: Math.abs(dateStepper.currentDate - new Date()) > 1000 - iconColor: enabled ? Theme.blendAlpha(Theme.surfaceText, 0.5) : "transparent" + iconColor: enabled ? Theme.blendAlpha(Theme.surfaceText, 0.5) : Theme.withAlpha(Theme.blendAlpha(Theme.surfaceText, 0.5), 0) iconSize: 12 buttonSize: 20 iconName: "replay" diff --git a/quickshell/Modules/Dock/Dock.qml b/quickshell/Modules/Dock/Dock.qml index 6aacb7a73..ab5a04dc9 100644 --- a/quickshell/Modules/Dock/Dock.qml +++ b/quickshell/Modules/Dock/Dock.qml @@ -52,7 +52,7 @@ Variants { readonly property real dockFrameInset: dockGeometry.frameInset readonly property real surfaceRadius: usesConnectedFrameChrome ? Theme.connectedSurfaceRadius : Theme.cornerRadius readonly property color surfaceColor: usesConnectedFrameChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency) - readonly property color surfaceBorderColor: usesConnectedFrameChrome ? "transparent" : BlurService.borderColor + readonly property color surfaceBorderColor: usesConnectedFrameChrome ? Theme.withAlpha(BlurService.borderColor, 0) : BlurService.borderColor readonly property real surfaceBorderWidth: usesConnectedFrameChrome ? 0 : BlurService.borderWidth readonly property real surfaceTopLeftRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius readonly property real surfaceTopRightRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius diff --git a/quickshell/Modules/Dock/DockAppButton.qml b/quickshell/Modules/Dock/DockAppButton.qml index e944a4d5d..e28696fdc 100644 --- a/quickshell/Modules/Dock/DockAppButton.qml +++ b/quickshell/Modules/Dock/DockAppButton.qml @@ -447,7 +447,7 @@ Item { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3) + color: Theme.primarySelected border.width: 2 border.color: Theme.primary visible: dragging @@ -593,7 +593,7 @@ Item { if (isWindowFocused) { return Theme.primary; } - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6); + return Theme.surfaceTextSecondary; } if (appData.type === "grouped" && appData.windowCount > 1) { @@ -603,7 +603,7 @@ Item { } } - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6); + return Theme.surfaceTextSecondary; } } } @@ -651,7 +651,7 @@ Item { if (isWindowFocused) { return Theme.primary; } - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6); + return Theme.surfaceTextSecondary; } if (appData.type === "grouped" && appData.windowCount > 1) { @@ -661,7 +661,7 @@ Item { } } - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6); + return Theme.surfaceTextSecondary; } } } diff --git a/quickshell/Modules/Dock/DockApps.qml b/quickshell/Modules/Dock/DockApps.qml index 85367c024..d894fc9ff 100644 --- a/quickshell/Modules/Dock/DockApps.qml +++ b/quickshell/Modules/Dock/DockApps.qml @@ -573,7 +573,7 @@ Item { visible: itemData.type === "separator" width: root.isVertical ? root.iconSize * 0.5 : 2 height: root.isVertical ? 2 : root.iconSize * 0.5 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3) + color: Theme.outlineHeavy radius: 1 anchors.centerIn: parent } diff --git a/quickshell/Modules/Dock/DockContextMenu.qml b/quickshell/Modules/Dock/DockContextMenu.qml index c4510103a..68249fec6 100644 --- a/quickshell/Modules/Dock/DockContextMenu.qml +++ b/quickshell/Modules/Dock/DockContextMenu.qml @@ -34,7 +34,7 @@ DockContextMenuBase { width: parent.width height: 28 radius: Theme.cornerRadius - color: windowArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: windowArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) StyledText { anchors.left: parent.left @@ -58,7 +58,7 @@ DockContextMenuBase { width: 20 height: 20 radius: 10 - color: closeMouseArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.2) : "transparent" + color: closeMouseArea.containsMouse ? Theme.errorPressed : Theme.withAlpha(Theme.errorPressed, 0) DankIcon { anchors.centerIn: parent @@ -114,7 +114,7 @@ DockContextMenuBase { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Repeater { @@ -124,7 +124,7 @@ DockContextMenuBase { width: parent.width height: 28 radius: Theme.cornerRadius - color: actionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: actionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.left: parent.left @@ -191,7 +191,7 @@ DockContextMenuBase { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Rectangle { @@ -199,7 +199,7 @@ DockContextMenuBase { width: parent.width height: 28 radius: Theme.cornerRadius - color: pinArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: pinArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.left: parent.left @@ -264,7 +264,7 @@ DockContextMenuBase { } width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } Rectangle { @@ -272,7 +272,7 @@ DockContextMenuBase { width: parent.width height: 28 radius: Theme.cornerRadius - color: nvidiaArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: nvidiaArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) Row { anchors.left: parent.left @@ -327,7 +327,7 @@ DockContextMenuBase { width: parent.width height: 28 radius: Theme.cornerRadius - color: closeArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) : "transparent" + color: closeArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) Row { anchors.left: parent.left diff --git a/quickshell/Modules/Dock/DockContextMenuBase.qml b/quickshell/Modules/Dock/DockContextMenuBase.qml index 1b66e08ba..1fec294ea 100644 --- a/quickshell/Modules/Dock/DockContextMenuBase.qml +++ b/quickshell/Modules/Dock/DockContextMenuBase.qml @@ -157,7 +157,7 @@ PanelWindow { height: menuColumn.implicitHeight + Theme.spacingS * 2 color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 opacity: root.visible ? 1 : 0 diff --git a/quickshell/Modules/Dock/DockOverflowButton.qml b/quickshell/Modules/Dock/DockOverflowButton.qml index 0d6b439ed..73f84bfd1 100644 --- a/quickshell/Modules/Dock/DockOverflowButton.qml +++ b/quickshell/Modules/Dock/DockOverflowButton.qml @@ -18,7 +18,7 @@ Item { width: actualIconSize height: actualIconSize radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, mouseArea.containsMouse ? 0.2 : 0.1) + color: Theme.withAlpha(Theme.primary, mouseArea.containsMouse ? 0.2 : 0.1) Behavior on color { ColorAnimation { diff --git a/quickshell/Modules/Dock/DockTrashContextMenu.qml b/quickshell/Modules/Dock/DockTrashContextMenu.qml index 452bfa089..450072684 100644 --- a/quickshell/Modules/Dock/DockTrashContextMenu.qml +++ b/quickshell/Modules/Dock/DockTrashContextMenu.qml @@ -39,7 +39,7 @@ DockContextMenuBase { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } DockTrashMenuItem { diff --git a/quickshell/Modules/Dock/DockTrashMenuItem.qml b/quickshell/Modules/Dock/DockTrashMenuItem.qml index 288e38b1d..02b51504e 100644 --- a/quickshell/Modules/Dock/DockTrashMenuItem.qml +++ b/quickshell/Modules/Dock/DockTrashMenuItem.qml @@ -19,7 +19,7 @@ Rectangle { if (!area.containsMouse || !enabled) return "transparent"; if (isDestructive) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12); + return Theme.errorHover; return BlurService.hoverColor(Theme.widgetBaseHoverColor); } diff --git a/quickshell/Modules/Greetd/GreeterContent.qml b/quickshell/Modules/Greetd/GreeterContent.qml index d867d9585..6dd1b0ffa 100644 --- a/quickshell/Modules/Greetd/GreeterContent.qml +++ b/quickshell/Modules/Greetd/GreeterContent.qml @@ -1113,7 +1113,7 @@ Item { clip: true radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) + color: Theme.withAlpha(Theme.surfaceContainer, 0.9) border.color: inputField.activeFocus ? Theme.primary : Qt.rgba(1, 1, 1, 0.3) border.width: inputField.activeFocus ? 2 : 1 diff --git a/quickshell/Modules/Greetd/GreeterUserPicker.qml b/quickshell/Modules/Greetd/GreeterUserPicker.qml index cc53cd623..b2b166681 100644 --- a/quickshell/Modules/Greetd/GreeterUserPicker.qml +++ b/quickshell/Modules/Greetd/GreeterUserPicker.qml @@ -118,8 +118,8 @@ Item { width: userListView.width height: root.rowHeight radius: Theme.cornerRadius - color: userRowMouse.containsMouse ? Theme.surfacePressed : "transparent" - border.color: GreeterState.username === userRow.modelData.username ? Theme.primary : "transparent" + color: userRowMouse.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) + border.color: GreeterState.username === userRow.modelData.username ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: GreeterState.username === userRow.modelData.username ? 1 : 0 RowLayout { @@ -164,7 +164,7 @@ Item { height: root.actionRowHeight visible: root.manualEntryVisible radius: Theme.cornerRadius - color: manualEntryRowMouse.containsMouse ? Theme.surfacePressed : "transparent" + color: manualEntryRowMouse.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) RowLayout { anchors.fill: parent @@ -203,7 +203,7 @@ Item { height: root.actionRowHeight visible: root.autoLoginVisible radius: Theme.cornerRadius - color: autoLoginRowMouse.containsMouse ? Theme.surfacePressed : "transparent" + color: autoLoginRowMouse.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) RowLayout { anchors.fill: parent diff --git a/quickshell/Modules/Lock/LockPowerMenu.qml b/quickshell/Modules/Lock/LockPowerMenu.qml index 196919cb3..2f20d1f11 100644 --- a/quickshell/Modules/Lock/LockPowerMenu.qml +++ b/quickshell/Modules/Lock/LockPowerMenu.qml @@ -559,12 +559,12 @@ Rectangle { radius: Theme.cornerRadius color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; if (mouseArea.containsMouse) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08); + return Theme.primaryHoverLight; + return Theme.surfaceHover; } - border.color: isSelected ? Theme.primary : "transparent" + border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: isSelected ? 2 : 0 Rectangle { @@ -593,10 +593,10 @@ Rectangle { width: parent.width * root.holdProgress color: { if (gridButtonRect.modelData === "poweroff") - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3); + return Theme.errorSelected; if (gridButtonRect.modelData === "reboot") - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.3); - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.withAlpha(Theme.warning, 0.3); + return Theme.primarySelected; } } } @@ -634,13 +634,13 @@ Rectangle { width: 20 height: 16 radius: 4 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.1) + color: Theme.onSurface_12 anchors.horizontalCenter: parent.horizontalCenter StyledText { text: gridButtonRect.actionData.key font.pixelSize: Theme.fontSizeSmall - 1 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium anchors.centerIn: parent } @@ -692,12 +692,12 @@ Rectangle { radius: Theme.cornerRadius color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12); + return Theme.primaryHover; if (listMouseArea.containsMouse) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08); + return Theme.primaryHoverLight; + return Theme.surfaceHover; } - border.color: isSelected ? Theme.primary : "transparent" + border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: isSelected ? 2 : 0 Rectangle { @@ -726,10 +726,10 @@ Rectangle { width: parent.width * root.holdProgress color: { if (listButtonRect.modelData === "poweroff") - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.3); + return Theme.errorSelected; if (listButtonRect.modelData === "reboot") - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.3); - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.withAlpha(Theme.warning, 0.3); + return Theme.primarySelected; } } } @@ -772,7 +772,7 @@ Rectangle { width: 28 height: 20 radius: 4 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.1) + color: Theme.onSurface_12 anchors.right: parent.right anchors.rightMargin: Theme.spacingM anchors.verticalCenter: parent.verticalCenter @@ -780,7 +780,7 @@ Rectangle { StyledText { text: listButtonRect.actionData.key font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary font.weight: Font.Medium anchors.centerIn: parent } @@ -820,7 +820,7 @@ Rectangle { DankIcon { name: root.showHoldHint ? "warning" : "touch_app" size: Theme.fontSizeSmall - color: root.showHoldHint ? Theme.warning : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: root.showHoldHint ? Theme.warning : Theme.surfaceTextSecondary anchors.verticalCenter: parent.verticalCenter } @@ -841,7 +841,7 @@ Rectangle { return I18n.tr("Hold to confirm (%1s)").arg(durationSec); } font.pixelSize: Theme.fontSizeSmall - color: root.showHoldHint ? Theme.warning : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: root.showHoldHint ? Theme.warning : Theme.surfaceTextSecondary anchors.verticalCenter: parent.verticalCenter } } diff --git a/quickshell/Modules/Lock/LockScreenContent.qml b/quickshell/Modules/Lock/LockScreenContent.qml index c2355ce60..f050ae24c 100644 --- a/quickshell/Modules/Lock/LockScreenContent.qml +++ b/quickshell/Modules/Lock/LockScreenContent.qml @@ -766,7 +766,7 @@ Item { Layout.fillWidth: true Layout.preferredHeight: 60 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) + color: Theme.withAlpha(Theme.surfaceContainer, 0.9) border.color: passwordField.activeFocus ? Theme.primary : Qt.rgba(1, 1, 1, 0.3) border.width: passwordField.activeFocus ? 2 : 1 visible: SettingsData.lockScreenShowPasswordField || root.passwordBuffer.length > 0 @@ -1154,7 +1154,7 @@ Item { radius: 10 anchors.centerIn: parent color: "transparent" - border.color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3) + border.color: Theme.primarySelected border.width: 2 } @@ -1172,7 +1172,7 @@ Item { height: parent.height / 2 anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) + color: Theme.withAlpha(Theme.surfaceContainer, 0.9) } RotationAnimator on rotation { @@ -1464,7 +1464,7 @@ Item { height: 20 radius: 10 anchors.verticalCenter: parent.verticalCenter - color: prevArea.containsMouse ? Qt.rgba(255, 255, 255, 0.2) : "transparent" + color: prevArea.containsMouse ? Qt.rgba(255, 255, 255, 0.2) : Theme.withAlpha(Qt.rgba(255, 255, 255, 0.2), 0) visible: MprisController.activePlayer opacity: (MprisController.activePlayer?.canGoPrevious ?? false) ? 1 : 0.3 @@ -1514,7 +1514,7 @@ Item { height: 20 radius: 10 anchors.verticalCenter: parent.verticalCenter - color: nextArea.containsMouse ? Qt.rgba(255, 255, 255, 0.2) : "transparent" + color: nextArea.containsMouse ? Qt.rgba(255, 255, 255, 0.2) : Theme.withAlpha(Qt.rgba(255, 255, 255, 0.2), 0) visible: MprisController.activePlayer opacity: (MprisController.activePlayer?.canGoNext ?? false) ? 1 : 0.3 diff --git a/quickshell/Modules/Notepad/Notepad.qml b/quickshell/Modules/Notepad/Notepad.qml index 4b6ef5899..c79aa1a01 100644 --- a/quickshell/Modules/Notepad/Notepad.qml +++ b/quickshell/Modules/Notepad/Notepad.qml @@ -700,7 +700,7 @@ Item { width: Math.max(80, discardText.contentWidth + Theme.spacingM * 2) height: 36 radius: Theme.cornerRadius - color: discardArea.containsMouse ? Theme.surfaceTextHover : "transparent" + color: discardArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) border.color: Theme.surfaceVariantAlpha border.width: 1 diff --git a/quickshell/Modules/Notepad/NotepadSettings.qml b/quickshell/Modules/Notepad/NotepadSettings.qml index ff7eb3279..e664c6d10 100644 --- a/quickshell/Modules/Notepad/NotepadSettings.qml +++ b/quickshell/Modules/Notepad/NotepadSettings.qml @@ -67,7 +67,7 @@ Item { anchors.fill: parent visible: root.isVisible z: 50 - color: Qt.rgba(Theme.surface.r, Theme.surface.g, Theme.surface.b, 0.85) + color: Theme.withAlpha(Theme.surface, 0.85) WheelHandler { // Hold scroll so the editor beneath doesn't move while settings are open. @@ -90,8 +90,8 @@ Item { width: Math.min(360, root.width - Theme.spacingL * 2) height: Math.min(settingsColumn.implicitHeight + Theme.spacingXL * 2, root.height - Theme.spacingL * 2) radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, Theme.notepadTransparency) - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + color: Theme.withAlpha(Theme.surfaceContainer, Theme.notepadTransparency) + border.color: Theme.outlineMedium border.width: 1 z: 100 @@ -139,7 +139,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy } DankToggle { @@ -297,7 +297,7 @@ Item { iconName: "remove" iconSize: Theme.iconSizeSmall enabled: SettingsData.notepadFontSize > 8 - backgroundColor: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.5) + backgroundColor: Theme.withAlpha(Theme.surfaceVariant, 0.5) iconColor: Theme.surfaceText onClicked: { var newSize = Math.max(8, SettingsData.notepadFontSize - 1); @@ -309,8 +309,8 @@ Item { width: 60 height: 32 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.3) - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.withAlpha(Theme.surfaceVariant, 0.3) + border.color: Theme.outlineHeavy border.width: 1 StyledText { @@ -327,7 +327,7 @@ Item { iconName: "add" iconSize: Theme.iconSizeSmall enabled: SettingsData.notepadFontSize < 48 - backgroundColor: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.5) + backgroundColor: Theme.withAlpha(Theme.surfaceVariant, 0.5) iconColor: Theme.surfaceText onClicked: { var newSize = Math.min(48, SettingsData.notepadFontSize + 1); @@ -494,7 +494,7 @@ Item { width: parent.width implicitHeight: shortcutsHeader.height + (root.shortcutsExpanded ? shortcutsColumn.implicitHeight + Theme.spacingM : 0) radius: Theme.cornerRadius - color: root.shortcutsExpanded ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : "transparent" + color: root.shortcutsExpanded ? Theme.withAlpha(Theme.surfaceContainer, 0.95) : Theme.withAlpha(Theme.surfaceContainer, 0) border.color: root.shortcutsExpanded ? Theme.primary : Theme.outlineMedium border.width: root.shortcutsExpanded ? 2 : 1 diff --git a/quickshell/Modules/Notepad/NotepadTextEditor.qml b/quickshell/Modules/Notepad/NotepadTextEditor.qml index 56a148065..ac48ecfcc 100644 --- a/quickshell/Modules/Notepad/NotepadTextEditor.qml +++ b/quickshell/Modules/Notepad/NotepadTextEditor.qml @@ -449,7 +449,7 @@ Column { Layout.alignment: Qt.AlignVCenter text: I18n.tr("Find in note...") font: searchField.font - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary visible: searchField.text.length === 0 && !searchField.activeFocus Layout.leftMargin: -(searchField.width - 20) // Position over the input field } @@ -499,7 +499,7 @@ Column { StyledRect { width: parent.width height: parent.height - bottomControls.height - Theme.spacingM - (searchVisible ? searchBar.height + Theme.spacingM : 0) - color: Qt.rgba(Theme.surface.r, Theme.surface.g, Theme.surface.b, Theme.notepadTransparency) + color: Theme.withAlpha(Theme.surface, Theme.notepadTransparency) border.color: Theme.outlineMedium border.width: 1 radius: Theme.cornerRadius @@ -568,7 +568,7 @@ Column { text: index + 1 font.family: textArea.font.family font.pixelSize: textArea.font.pixelSize - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: Theme.onSurface_38 horizontalAlignment: Text.AlignRight } } @@ -578,7 +578,7 @@ Column { TextArea.flickable: TextArea { id: textArea placeholderText: "" - placeholderTextColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + placeholderTextColor: Theme.surfaceTextSecondary font.family: SettingsData.notepadUseMonospace ? SettingsData.monoFontFamily : (SettingsData.notepadFontFamily || SettingsData.fontFamily) font.pixelSize: SettingsData.notepadFontSize * SettingsData.fontScale font.letterSpacing: 0 @@ -714,7 +714,7 @@ Column { StyledText { id: placeholderOverlay text: I18n.tr("Start typing your notes here...") - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary font.family: textArea.font.family font.pixelSize: textArea.font.pixelSize visible: textArea.text.length === 0 @@ -750,7 +750,7 @@ Column { anchors.left: parent.left anchors.right: parent.right height: 36 - color: Qt.rgba(Theme.surface.r, Theme.surface.g, Theme.surface.b, Theme.notepadTransparency) + color: Theme.withAlpha(Theme.surface, Theme.notepadTransparency) z: 2 Row { diff --git a/quickshell/Modules/Notifications/Center/DndDurationMenu.qml b/quickshell/Modules/Notifications/Center/DndDurationMenu.qml index c8735a8f4..ffd7598b0 100644 --- a/quickshell/Modules/Notifications/Center/DndDurationMenu.qml +++ b/quickshell/Modules/Notifications/Center/DndDurationMenu.qml @@ -109,7 +109,7 @@ Rectangle { implicitHeight: menuColumn.implicitHeight + Theme.spacingM * 2 color: Theme.floatingSurface radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineStrong border.width: BlurService.enabled ? BlurService.borderWidth : 1 Column { @@ -164,7 +164,7 @@ Rectangle { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.15) + color: Theme.outlineStrong } Repeater { @@ -176,7 +176,7 @@ Rectangle { width: menuColumn.width height: 32 radius: Theme.cornerRadius - color: optionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent" + color: optionArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0) StyledText { anchors.left: parent.left @@ -204,7 +204,7 @@ Rectangle { visible: root.currentlyActive width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.15) + color: Theme.outlineStrong } Rectangle { @@ -212,7 +212,7 @@ Rectangle { width: menuColumn.width height: 32 radius: Theme.cornerRadius - color: offArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.14) : "transparent" + color: offArea.containsMouse ? Theme.errorPressed : Theme.withAlpha(Theme.errorPressed, 0) Row { anchors.left: parent.left diff --git a/quickshell/Modules/Notifications/Center/HistoryNotificationCard.qml b/quickshell/Modules/Notifications/Center/HistoryNotificationCard.qml index 7b7cf43dc..0633c4669 100644 --- a/quickshell/Modules/Notifications/Center/HistoryNotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/HistoryNotificationCard.qml @@ -53,9 +53,9 @@ Rectangle { } border.color: { if (isSelected && keyboardNavigationActive) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.5); + return Theme.withAlpha(Theme.primary, 0.5); if (historyItem.urgency === 2) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.primarySelected; return Theme.outlineMedium; } border.width: { @@ -211,14 +211,14 @@ Rectangle { StyledText { id: historySeparator text: (historyTitleText.text.length > 0 && historyTimeText.text.length > 0) ? " • " : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } StyledText { id: historyTimeText text: NotificationService.formatHistoryTime(historyItem.timestamp) - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal visible: text.length > 0 diff --git a/quickshell/Modules/Notifications/Center/NotificationCard.qml b/quickshell/Modules/Notifications/Center/NotificationCard.qml index 9c8869ec0..6c8d40803 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCard.qml @@ -142,13 +142,13 @@ Rectangle { } border.color: { if (isGroupSelected && keyboardNavigationActive) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.5); + return Theme.withAlpha(Theme.primary, 0.5); } if (keyboardNavigationActive && expanded && selectedNotificationIndex >= 0) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2); + return Theme.primaryPressed; } if (notificationGroup?.latestNotification?.urgency === NotificationUrgency.Critical) { - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); + return Theme.primarySelected; } return Theme.outlineMedium; } @@ -207,7 +207,7 @@ Rectangle { shadowSpreadPx: 0 shadowOffsetX: root.shadowOffsetXPx shadowOffsetY: root.shadowOffsetYPx - shadowColor: root.shadowElevation ? Theme.elevationShadowColor(root.shadowElevation) : "transparent" + shadowColor: root.shadowElevation ? Theme.elevationShadowColor(root.shadowElevation) : Theme.withAlpha(Theme.elevationShadowColor(root.shadowElevation), 0) shadowEnabled: root.shadowsAllowed && !root.connectedFrameMode } @@ -352,7 +352,7 @@ Rectangle { StyledText { id: collapsedHeaderAppNameText text: notificationGroup?.appName || "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal elide: Text.ElideRight @@ -363,7 +363,7 @@ Rectangle { StyledText { id: collapsedHeaderSeparator text: (collapsedHeaderAppNameText.text.length > 0 && collapsedHeaderTimeText.text.length > 0) ? " • " : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } @@ -371,7 +371,7 @@ Rectangle { StyledText { id: collapsedHeaderTimeText text: notificationGroup?.latestNotification?.timeStr || "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } @@ -568,7 +568,7 @@ Rectangle { } radius: Theme.cornerRadius color: isSelected ? Theme.primaryPressed : Theme.nestedSurface - border.color: isSelected ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Theme.outlineMedium + border.color: isSelected ? Theme.withAlpha(Theme.primary, 0.4) : Theme.outlineMedium border.width: 1 Behavior on border.color { @@ -664,7 +664,7 @@ Rectangle { StyledText { id: expandedDelegateHeaderAppNameText text: modelData?.appName || "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal elide: Text.ElideRight @@ -675,7 +675,7 @@ Rectangle { StyledText { id: expandedDelegateHeaderSeparator text: (expandedDelegateHeaderAppNameText.text.length > 0 && expandedDelegateHeaderTimeText.text.length > 0) ? " • " : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } @@ -683,7 +683,7 @@ Rectangle { StyledText { id: expandedDelegateHeaderTimeText text: modelData?.timeStr || "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } @@ -779,7 +779,7 @@ Rectangle { width: Math.max(expandedActionText.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) StyledText { id: expandedActionText @@ -821,7 +821,7 @@ Rectangle { width: Math.max(expandedClearText.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) Behavior on opacity { NumberAnimation { @@ -918,7 +918,7 @@ Rectangle { width: Math.max(collapsedActionText.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) StyledText { id: collapsedActionText @@ -968,7 +968,7 @@ Rectangle { width: Math.max(collapsedClearText.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) StyledText { id: collapsedClearText @@ -1063,7 +1063,7 @@ Rectangle { color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.width: 0 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: Theme.outlineStrong } MenuItem { @@ -1079,7 +1079,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1105,7 +1105,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1133,7 +1133,7 @@ Rectangle { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } diff --git a/quickshell/Modules/Notifications/Center/NotificationEmptyState.qml b/quickshell/Modules/Notifications/Center/NotificationEmptyState.qml index da8746e2a..659e66d89 100644 --- a/quickshell/Modules/Notifications/Center/NotificationEmptyState.qml +++ b/quickshell/Modules/Notifications/Center/NotificationEmptyState.qml @@ -19,14 +19,14 @@ Item { anchors.horizontalCenter: parent.horizontalCenter name: "notifications_none" size: Theme.iconSizeLarge + 16 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3) + color: Theme.surfaceTextAlpha } StyledText { anchors.horizontalCenter: parent.horizontalCenter text: I18n.tr("Nothing to see here") font.pixelSize: Theme.fontSizeLarge - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3) + color: Theme.surfaceTextAlpha font.weight: Font.Medium horizontalAlignment: Text.AlignHCenter } diff --git a/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml b/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml index 78ba2d520..f734f5a27 100644 --- a/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml +++ b/quickshell/Modules/Notifications/Center/NotificationKeyboardHints.qml @@ -9,7 +9,7 @@ Rectangle { height: 80 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) + color: Theme.withAlpha(Theme.surfaceContainer, 0.95) border.color: Theme.primary border.width: 2 opacity: showHints ? 1 : 0 diff --git a/quickshell/Modules/Notifications/Center/NotificationSettings.qml b/quickshell/Modules/Notifications/Center/NotificationSettings.qml index 829471b4a..0452027f6 100644 --- a/quickshell/Modules/Notifications/Center/NotificationSettings.qml +++ b/quickshell/Modules/Notifications/Center/NotificationSettings.qml @@ -167,7 +167,7 @@ Rectangle { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + color: Theme.outlineStrong } StyledText { @@ -225,7 +225,7 @@ Rectangle { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + color: Theme.outlineStrong } Item { @@ -333,7 +333,7 @@ Rectangle { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + color: Theme.outlineStrong } StyledText { diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml index acd897f24..a3187d79e 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml @@ -639,7 +639,7 @@ PanelWindow { shadowBlurPx: content.shadowBlurPx shadowOffsetX: content.shadowOffsetX shadowOffsetY: content.shadowOffsetY - shadowColor: content.shadowsAllowed && content.elevLevel ? Theme.elevationShadowColor(content.elevLevel) : "transparent" + shadowColor: content.shadowsAllowed && content.elevLevel ? Theme.elevationShadowColor(content.elevLevel) : Theme.withAlpha(Theme.elevationShadowColor(content.elevLevel), 0) shadowEnabled: !win._isDestroying && win.screenValid && content.shadowsAllowed && !win.connectedFrameMode sourceX: content.shadowRenderPadding + content.cardInset @@ -690,7 +690,7 @@ PanelWindow { anchors.margins: content.cardInset radius: win.connectedFrameMode ? Theme.connectedSurfaceRadius : Theme.cornerRadius color: "transparent" - border.color: win.connectedFrameMode ? "transparent" : BlurService.borderColor + border.color: win.connectedFrameMode ? Theme.withAlpha(BlurService.borderColor, 0) : BlurService.borderColor border.width: win.connectedFrameMode ? 0 : BlurService.borderWidth z: 100 scale: content.chromeScale @@ -891,7 +891,7 @@ PanelWindow { StyledText { id: headerAppNameText text: notificationData ? (notificationData.appName || "") : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal elide: Text.ElideRight @@ -902,7 +902,7 @@ PanelWindow { StyledText { id: headerSeparator text: (headerAppNameText.text.length > 0 && headerTimeText.text.length > 0) ? " • " : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } @@ -910,13 +910,12 @@ PanelWindow { StyledText { id: headerTimeText text: notificationData ? (notificationData.timeStr || "") : "" - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium font.pixelSize: Theme.fontSizeSmall font.weight: Font.Normal } } - StyledText { text: notificationData ? (notificationData.summary || "") : "" color: Theme.surfaceText @@ -1041,7 +1040,7 @@ PanelWindow { width: Math.max(actionText.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) StyledText { id: actionText @@ -1093,7 +1092,7 @@ PanelWindow { width: Math.max(clearTextLabel.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius - color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : "transparent" + color: isHovered ? Theme.withAlpha(Theme.primary, Theme.stateLayerHover) : Theme.withAlpha(Theme.primary, 0) z: 20 StyledText { @@ -1389,7 +1388,7 @@ PanelWindow { color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.width: 0 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + border.color: Theme.outlineStrong } MenuItem { @@ -1405,7 +1404,7 @@ PanelWindow { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1431,7 +1430,7 @@ PanelWindow { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1460,7 +1459,7 @@ PanelWindow { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } diff --git a/quickshell/Modules/Plugins/BasePill.qml b/quickshell/Modules/Plugins/BasePill.qml index 64e6705e0..c6cdba328 100644 --- a/quickshell/Modules/Plugins/BasePill.qml +++ b/quickshell/Modules/Plugins/BasePill.qml @@ -111,7 +111,7 @@ Item { const baseColor = isHovered ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.widgetBaseBackgroundColor; if (Theme.widgetBackgroundHasAlpha) { - return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency); + return Theme.blendAlpha(baseColor, transparency); } return Theme.withAlpha(baseColor, transparency); } diff --git a/quickshell/Modules/Plugins/PopoutComponent.qml b/quickshell/Modules/Plugins/PopoutComponent.qml index 7ccf63713..c33de4604 100644 --- a/quickshell/Modules/Plugins/PopoutComponent.qml +++ b/quickshell/Modules/Plugins/PopoutComponent.qml @@ -48,7 +48,7 @@ Column { width: 32 height: 32 radius: 16 - color: closeArea.containsMouse ? Theme.errorHover : "transparent" + color: closeArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) visible: root.showCloseButton DankIcon { diff --git a/quickshell/Modules/ProcessList/DisksView.qml b/quickshell/Modules/ProcessList/DisksView.qml index 03009cd0f..82506f614 100644 --- a/quickshell/Modules/ProcessList/DisksView.qml +++ b/quickshell/Modules/ProcessList/DisksView.qml @@ -159,7 +159,7 @@ Item { width: mountListView.width height: 60 radius: Theme.cornerRadius - color: mountMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.06) : "transparent" + color: mountMouseArea.containsMouse ? Theme.primaryBackground : Theme.withAlpha(Theme.primaryBackground, 0) readonly property real usedPct: { const pctStr = modelData?.percent ?? "0%"; @@ -244,7 +244,7 @@ Item { width: parent.width height: 8 radius: 4 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: Theme.outlineHeavy Rectangle { width: parent.width * Math.min(1, parent.parent.parent.parent.usedPct) diff --git a/quickshell/Modules/ProcessList/PerformanceView.qml b/quickshell/Modules/ProcessList/PerformanceView.qml index 2c0291eab..a847107c7 100644 --- a/quickshell/Modules/ProcessList/PerformanceView.qml +++ b/quickshell/Modules/ProcessList/PerformanceView.qml @@ -203,8 +203,8 @@ Item { const c = card.accentColor; const grad = ctx.createLinearGradient(0, 0, 0, height); - grad.addColorStop(0, Qt.rgba(c.r, c.g, c.b, 0.25)); - grad.addColorStop(1, Qt.rgba(c.r, c.g, c.b, 0.02)); + grad.addColorStop(0, Theme.withAlpha(c, 0.25)); + grad.addColorStop(1, Theme.withAlpha(c, 0.02)); ctx.fillStyle = grad; ctx.beginPath(); @@ -218,7 +218,7 @@ Item { ctx.closePath(); ctx.fill(); - ctx.strokeStyle = Qt.rgba(c.r, c.g, c.b, 0.8); + ctx.strokeStyle = Theme.withAlpha(c, 0.8); ctx.lineWidth = 2; ctx.beginPath(); for (let j = 0; j < hist.length; j++) { @@ -229,7 +229,7 @@ Item { ctx.stroke(); if (hist2 && hist2.length >= 2 && card.showSecondary) { - ctx.strokeStyle = Qt.rgba(c.r, c.g, c.b, 0.4); + ctx.strokeStyle = Theme.withAlpha(c, 0.4); ctx.lineWidth = 1.5; ctx.setLineDash([4, 4]); ctx.beginPath(); diff --git a/quickshell/Modules/ProcessList/ProcessContextMenu.qml b/quickshell/Modules/ProcessList/ProcessContextMenu.qml index 997e3a177..78986fc26 100644 --- a/quickshell/Modules/ProcessList/ProcessContextMenu.qml +++ b/quickshell/Modules/ProcessList/ProcessContextMenu.qml @@ -187,7 +187,7 @@ Popup { contentItem: Rectangle { color: Theme.floatingSurface radius: Theme.cornerRadius - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium border.width: BlurService.enabled ? BlurService.borderWidth : 1 Item { @@ -254,7 +254,7 @@ Popup { height: 1 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.15) + color: Theme.outlineStrong } Rectangle { @@ -269,12 +269,12 @@ Popup { const isSelected = keyboardNavigation && selectedIndex === index; if (modelData.dangerous) { if (isSelected) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.2); - return menuItemArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) : "transparent"; + return Theme.errorPressed; + return menuItemArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0); } if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2); - return menuItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : "transparent"; + return Theme.primaryPressed; + return menuItemArea.containsMouse ? BlurService.hoverColor(Theme.widgetBaseHoverColor) : Theme.withAlpha(BlurService.hoverColor(Theme.widgetBaseHoverColor), 0); } opacity: modelData.enabled ? 1 : 0.5 diff --git a/quickshell/Modules/ProcessList/ProcessListPopout.qml b/quickshell/Modules/ProcessList/ProcessListPopout.qml index 8f540d42b..9e4dd8013 100644 --- a/quickshell/Modules/ProcessList/ProcessListPopout.qml +++ b/quickshell/Modules/ProcessList/ProcessListPopout.qml @@ -243,7 +243,7 @@ DankPopout { width: Theme.fontSizeMedium * 3 height: width radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover SystemLogo { anchors.centerIn: parent @@ -440,7 +440,7 @@ DankPopout { const prog = startAngle + (endAngle - startAngle) * gaugeRoot.animValue; ctx.beginPath(); ctx.arc(cx, cy, radius, startAngle, prog); - ctx.strokeStyle = Qt.rgba(gaugeRoot.accentColor.r, gaugeRoot.accentColor.g, gaugeRoot.accentColor.b, 0.2); + ctx.strokeStyle = Theme.withAlpha(gaugeRoot.accentColor, 0.2); ctx.lineWidth = gaugeRoot.thickness + gaugeRoot.glowExtra; ctx.stroke(); } @@ -481,7 +481,7 @@ DankPopout { ctx.beginPath(); ctx.arc(cx, cy, radius, startAngle, endAngle); - ctx.strokeStyle = Qt.rgba(gaugeRoot.accentColor.r, gaugeRoot.accentColor.g, gaugeRoot.accentColor.b, 0.1); + ctx.strokeStyle = Theme.withAlpha(gaugeRoot.accentColor, 0.1); ctx.lineWidth = gaugeRoot.thickness; ctx.stroke(); diff --git a/quickshell/Modules/ProcessList/ProcessesView.qml b/quickshell/Modules/ProcessList/ProcessesView.qml index cd57a3577..d3582c0bd 100644 --- a/quickshell/Modules/ProcessList/ProcessesView.qml +++ b/quickshell/Modules/ProcessList/ProcessesView.qml @@ -397,7 +397,7 @@ Item { anchors.fill: parent anchors.margins: 2 radius: Theme.cornerRadius - color: headerItem.isActive ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : (headerMouseArea.containsMouse ? Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.06) : "transparent") + color: headerItem.isActive ? Theme.primaryHover : (headerMouseArea.containsMouse ? Theme.surfaceTextLight : Theme.withAlpha(Theme.surfaceTextLight, 0)) Behavior on color { ColorAnimation { @@ -470,13 +470,13 @@ Item { radius: Theme.cornerRadius color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15); - return processMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.06) : "transparent"; + return Theme.primaryPressed; + return processMouseArea.containsMouse ? Theme.primaryBackground : Theme.withAlpha(Theme.primaryBackground, 0); } border.color: { if (isSelected) - return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3); - return processMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent"; + return Theme.primarySelected; + return processMouseArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0); } border.width: 1 clip: true @@ -572,10 +572,10 @@ Item { radius: Theme.cornerRadius color: { if (processItemRoot.processCpu > 80) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.15); + return Theme.errorPressed; if (processItemRoot.processCpu > 50) - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12); - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.06); + return Theme.warningHover; + return Theme.surfaceTextLight; } StyledText { @@ -606,10 +606,10 @@ Item { radius: Theme.cornerRadius color: { if (processItemRoot.processMemKB > 2 * 1024 * 1024) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.15); + return Theme.errorPressed; if (processItemRoot.processMemKB > 1024 * 1024) - return Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12); - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.06); + return Theme.warningHover; + return Theme.surfaceTextLight; } StyledText { @@ -662,7 +662,7 @@ Item { height: processItemRoot.isExpanded ? (expandedContent.implicitHeight + Theme.spacingS * 2) : 0 anchors.horizontalCenter: parent.horizontalCenter radius: Theme.cornerRadius - 2 - color: Qt.rgba(Theme.surfaceContainerHigh.r, Theme.surfaceContainerHigh.g, Theme.surfaceContainerHigh.b, 0.6) + color: Theme.withAlpha(Theme.surfaceContainerHigh, 0.6) clip: true visible: processItemRoot.isExpanded @@ -711,7 +711,7 @@ Item { Layout.preferredHeight: 24 Layout.alignment: Qt.AlignVCenter radius: Theme.cornerRadius - 2 - color: copyMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) : "transparent" + color: copyMouseArea.containsMouse ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) DankIcon { anchors.centerIn: parent diff --git a/quickshell/Modules/ProcessList/SystemView.qml b/quickshell/Modules/ProcessList/SystemView.qml index ffa1d99aa..1ddd4b086 100644 --- a/quickshell/Modules/ProcessList/SystemView.qml +++ b/quickshell/Modules/ProcessList/SystemView.qml @@ -148,22 +148,22 @@ Item { color: { const vendor = (modelData?.vendor ?? "").toLowerCase(); if (vendor.includes("nvidia")) - return Qt.rgba(Theme.success.r, Theme.success.g, Theme.success.b, 0.08); + return Theme.withAlpha(Theme.success, 0.08); if (vendor.includes("amd")) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.08); + return Theme.errorHover; if (vendor.includes("intel")) - return Qt.rgba(Theme.info.r, Theme.info.g, Theme.info.b, 0.08); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08); + return Theme.withAlpha(Theme.info, 0.08); + return Theme.surfaceHover; } border.color: { const vendor = (modelData?.vendor ?? "").toLowerCase(); if (vendor.includes("nvidia")) - return Qt.rgba(Theme.success.r, Theme.success.g, Theme.success.b, 0.2); + return Theme.withAlpha(Theme.success, 0.2); if (vendor.includes("amd")) - return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.2); + return Theme.errorPressed; if (vendor.includes("intel")) - return Qt.rgba(Theme.info.r, Theme.info.g, Theme.info.b, 0.2); - return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.2); + return Theme.withAlpha(Theme.info, 0.2); + return Theme.surfaceVariantAlpha; } border.width: 1 @@ -242,8 +242,8 @@ Item { width: 70 height: 32 radius: Theme.cornerRadius - color: parent.parent.tempEnabled ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.3) : Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.15) - border.color: tempMouseArea.containsMouse ? Theme.outline : "transparent" + color: parent.parent.tempEnabled ? Theme.withAlpha(Theme.surfaceVariant, 0.3) : Theme.surfaceSelected + border.color: tempMouseArea.containsMouse ? Theme.outline : Theme.withAlpha(Theme.outline, 0) border.width: 1 Row { diff --git a/quickshell/Modules/Settings/AboutTab.qml b/quickshell/Modules/Settings/AboutTab.qml index bb37b3ef3..7a8ae8e10 100644 --- a/quickshell/Modules/Settings/AboutTab.qml +++ b/quickshell/Modules/Settings/AboutTab.qml @@ -132,7 +132,7 @@ Item { height: asciiSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { @@ -274,7 +274,7 @@ Item { text: resourceButtonsRow.compactMode ? "" : I18n.tr("Docs") iconName: "menu_book" iconSize: 18 - backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + backgroundColor: Theme.surfaceTextHover textColor: Theme.surfaceText onClicked: Qt.openUrlExternally("https://danklinux.com/docs") onHoveredChanged: { @@ -290,7 +290,7 @@ Item { text: resourceButtonsRow.compactMode ? "" : I18n.tr("Plugins") iconName: "extension" iconSize: 18 - backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + backgroundColor: Theme.surfaceTextHover textColor: Theme.surfaceText onClicked: Qt.openUrlExternally("https://plugins.danklinux.com") onHoveredChanged: { @@ -306,7 +306,7 @@ Item { text: resourceButtonsRow.compactMode ? "" : I18n.tr("GitHub") iconName: "code" iconSize: 18 - backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + backgroundColor: Theme.surfaceTextHover textColor: Theme.surfaceText onClicked: Qt.openUrlExternally("https://github.com/AvengeMedia/DankMaterialShell") onHoveredChanged: { @@ -322,7 +322,7 @@ Item { text: resourceButtonsRow.compactMode ? "" : I18n.tr("Ko-fi") iconName: "favorite" iconSize: 18 - backgroundColor: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + backgroundColor: Theme.primaryHover textColor: Theme.primary onClicked: Qt.openUrlExternally("https://ko-fi.com/danklinux") onHoveredChanged: { @@ -551,7 +551,7 @@ Item { height: projectSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { @@ -607,7 +607,7 @@ Item { height: backendSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { @@ -747,7 +747,7 @@ Item { width: capText.implicitWidth + 16 height: 26 radius: 13 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + color: Theme.primaryHover StyledText { id: capText @@ -768,7 +768,7 @@ Item { height: toolsSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { @@ -805,7 +805,7 @@ Item { DankButton { text: I18n.tr("Show Welcome") iconName: "waving_hand" - backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + backgroundColor: Theme.surfaceTextHover textColor: Theme.surfaceText onClicked: FirstLaunchService.showWelcome() } @@ -813,7 +813,7 @@ Item { DankButton { text: I18n.tr("System Check") iconName: "vital_signs" - backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + backgroundColor: Theme.surfaceTextHover textColor: Theme.surfaceText onClicked: FirstLaunchService.showDoctor() } diff --git a/quickshell/Modules/Settings/AudioTab.qml b/quickshell/Modules/Settings/AudioTab.qml index cd54c91bb..b8721098c 100644 --- a/quickshell/Modules/Settings/AudioTab.qml +++ b/quickshell/Modules/Settings/AudioTab.qml @@ -718,7 +718,7 @@ Item { width: cancelButtonText.width + Theme.spacingL * 2 height: Theme.buttonHeight radius: Theme.cornerRadius - color: cancelButtonMouseArea.containsMouse ? Theme.surfaceHover : "transparent" + color: cancelButtonMouseArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) border.width: 1 border.color: Theme.outline diff --git a/quickshell/Modules/Settings/AutoStartTab.qml b/quickshell/Modules/Settings/AutoStartTab.qml index 065fd0ce9..ba8856f79 100644 --- a/quickshell/Modules/Settings/AutoStartTab.qml +++ b/quickshell/Modules/Settings/AutoStartTab.qml @@ -29,14 +29,16 @@ Item { function lookupDesktopIcon(name, exec, fileName) { const appId = fileName ? fileName.replace(/\.desktop$/, "") : ""; let entry = appId ? DesktopEntries.heuristicLookup(appId) : null; - if (entry && entry.icon) return entry.icon; + if (entry && entry.icon) + return entry.icon; if (exec) { const cmdBase = exec.split(" ")[0].split("/").pop(); for (let i = 0; i < root.desktopApps.length; i++) { const app = root.desktopApps[i]; if (app.icon) { const appExec = (app.exec || app.execString || "").split(" ")[0].split("/").pop(); - if (appExec === cmdBase) return app.icon; + if (appExec === cmdBase) + return app.icon; } } } @@ -44,7 +46,8 @@ Item { } function parseDesktopFile(content, filePath) { - if (!content || content.length === 0) return null; + if (!content || content.length === 0) + return null; const lines = content.split("\n"); let name = ""; let execCmd = ""; @@ -56,28 +59,45 @@ Item { if (line === "[Desktop Entry]") { isDesktopEntry = true; } else if (isDesktopEntry) { - if (line.startsWith("[")) break; + if (line.startsWith("[")) + break; const nameMatch = line.match(/^Name=(.+)$/); - if (nameMatch) name = nameMatch[1]; + if (nameMatch) + name = nameMatch[1]; const execMatch = line.match(/^Exec=(.+)$/); - if (execMatch) execCmd = execMatch[1]; + if (execMatch) + execCmd = execMatch[1]; const iconMatch = line.match(/^Icon=(.+)$/); - if (iconMatch) icon = iconMatch[1]; + if (iconMatch) + icon = iconMatch[1]; const hiddenMatch = line.match(/^Hidden=(true|false)$/); - if (hiddenMatch) hidden = hiddenMatch[1] === "true"; + if (hiddenMatch) + hidden = hiddenMatch[1] === "true"; } } - if (!isDesktopEntry || !name || !execCmd) return null; + if (!isDesktopEntry || !name || !execCmd) + return null; const fileName = filePath.split("/").pop(); - if (!icon) icon = root.lookupDesktopIcon(name, execCmd, fileName); - return { name: name, exec: execCmd, icon: icon, hidden: hidden, filePath: filePath, fileName: fileName, content: content }; + if (!icon) + icon = root.lookupDesktopIcon(name, execCmd, fileName); + return { + name: name, + exec: execCmd, + icon: icon, + hidden: hidden, + filePath: filePath, + fileName: fileName, + content: content + }; } function addEntry() { if (newEntryType === "desktop") { - if (!newEntryDesktopId) return; + if (!newEntryDesktopId) + return; const app = desktopApps.find(a => (a.id || a.execString) === newEntryDesktopId); - if (!app) return; + if (!app) + return; const entryName = app.name || newEntryDesktopId; const appExec = app.exec || app.execString || ""; const execCmd = root.newEntryCommandWrapper.replace("%command%", appExec); @@ -85,7 +105,8 @@ Item { const fileName = entryName.toLowerCase().replace(/[^a-z0-9]/g, "-") + ".desktop"; writeDesktopFile(fileName, entryName, execCmd, appIcon); } else { - if (!newEntryName || !newEntryExec) return; + if (!newEntryName || !newEntryExec) + return; const fileName = newEntryName.toLowerCase().replace(/[^a-z0-9]/g, "-") + ".desktop"; writeDesktopFile(fileName, newEntryName, newEntryExec, ""); } @@ -93,14 +114,16 @@ Item { function writeDesktopFile(fileName, name, execCmd, icon) { let content = "[Desktop Entry]\nType=Application\nName=" + name + "\nExec=" + execCmd + "\n"; - if (icon) content += "Icon=" + icon + "\n"; + if (icon) + content += "Icon=" + icon + "\n"; writerFileView.path = root.autostartDir + "/" + fileName; writerFileView.setText(content); root.resetNewEntry(); } function setHidden(entry, hidden) { - if (!entry || !entry.content) return; + if (!entry || !entry.content) + return; const lines = entry.content.split("\n"); const hiddenValue = hidden ? "true" : "false"; let found = false; @@ -162,7 +185,7 @@ Item { blockLoading: true atomicWrites: true onSaveFailed: error => { - ToastService.showError(I18n.tr("Failed to write autostart entry")) + ToastService.showError(I18n.tr("Failed to write autostart entry")); log.warn("Failed to write autostart entry to " + writerFileView.path + ": " + error); } } @@ -176,7 +199,8 @@ Item { sortField: FolderListModel.Name onStatusChanged: { - if (status !== FolderListModel.Ready) return; + if (status !== FolderListModel.Ready) + return; // rebuild entries const validPaths = new Set(); for (let i = 0; i < folderModel.count; i++) { @@ -244,7 +268,10 @@ Item { function generateTrayIconFixSystemdOverride() { const configHome = Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)); const dir = configHome + "/systemd/user/app-@autostart.service.d"; - const proc = systemdOverrideMkDirComp.createObject(root, { targetPath: dir, running: true }); + const proc = systemdOverrideMkDirComp.createObject(root, { + targetPath: dir, + running: true + }); } FileView { @@ -253,10 +280,12 @@ Item { // make sure we don't overwrite an existing override with a default one, in case the user has already customized it function buildOverrideContent(existing) { - if (!existing) return "[Unit]\nAfter=dms.service\n"; + if (!existing) + return "[Unit]\nAfter=dms.service\n"; const lines = existing.split("\n"); const hasAfter = lines.some(l => l.trim() === "After=dms.service"); - if (hasAfter) return existing; + if (hasAfter) + return existing; const unitIdx = lines.findIndex(l => l.trim() === "[Unit]"); if (unitIdx >= 0) { lines.splice(unitIdx + 1, 0, "After=dms.service"); @@ -268,7 +297,8 @@ Item { onLoaded: { const merged = buildOverrideContent(text()); - if (merged !== text()) setText(merged); + if (merged !== text()) + setText(merged); ToastService.showInfo(I18n.tr("Systemd Override generated")); } @@ -288,7 +318,7 @@ Item { Process { property string targetPath: "" command: ["mkdir", "-p", targetPath] - onExited: (exitCode) => { + onExited: exitCode => { if (exitCode === 0) { systemdOverrideWriter.path = targetPath + "/override.conf"; } else { @@ -303,7 +333,7 @@ Item { id: autostartInitMkDirComp Process { command: ["mkdir", "-p", root.autostartDir] - onExited: (exitCode) => { + onExited: exitCode => { if (exitCode === 0) { folderModel.folder = "file://" + root.autostartDir; } @@ -314,7 +344,9 @@ Item { Component.onCompleted: { desktopApps = AppSearchService.getVisibleApplications() || []; - autostartInitMkDirComp.createObject(root, { running: true }); + autostartInitMkDirComp.createObject(root, { + running: true + }); } Component.onDestruction: { @@ -399,7 +431,8 @@ Item { LayoutMirroring.childrenInherit: true readonly property string selectedName: { - if (!root.newEntryDesktopId) return ""; + if (!root.newEntryDesktopId) + return ""; const app = root.desktopApps.find(a => (a.id || a.execString) === root.newEntryDesktopId); return app ? (app.name || app.id || "") : root.newEntryDesktopId; } @@ -576,7 +609,8 @@ Item { text: I18n.tr("Add to Autostart") iconName: "add" enabled: { - if (root.newEntryType === "desktop") return root.newEntryDesktopId !== ""; + if (root.newEntryType === "desktop") + return root.newEntryDesktopId !== ""; return root.newEntryName !== "" && root.newEntryExec !== ""; } onClicked: root.addEntry() @@ -631,7 +665,7 @@ Item { width: entriesList.width height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: Theme.withAlpha(Theme.surfaceContainer, 0.3) border.width: 0 Row { diff --git a/quickshell/Modules/Settings/ClipboardTab.qml b/quickshell/Modules/Settings/ClipboardTab.qml index efe4e160b..d20400741 100644 --- a/quickshell/Modules/Settings/ClipboardTab.qml +++ b/quickshell/Modules/Settings/ClipboardTab.qml @@ -272,7 +272,7 @@ Item { width: parent.width height: warningContent.implicitHeight + Theme.spacingM * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) + color: Theme.warningHover visible: !DMSService.isConnected || configError Row { diff --git a/quickshell/Modules/Settings/DankDashTab.qml b/quickshell/Modules/Settings/DankDashTab.qml index a82ba73e6..f3108dd4f 100644 --- a/quickshell/Modules/Settings/DankDashTab.qml +++ b/quickshell/Modules/Settings/DankDashTab.qml @@ -418,10 +418,10 @@ Item { if (rowItem.dragging) return Theme.secondaryContainer; const base = Theme.surfaceContainer; - return Qt.rgba(base.r, base.g, base.b, rowItem.isEnabled ? 0.7 : 0.4); + return Theme.withAlpha(base, rowItem.isEnabled ? 0.7 : 0.4); } border.width: rowItem.dragging ? 2 : 1 - border.color: rowItem.dragging ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: rowItem.dragging ? Theme.primary : Theme.outlineHeavy Behavior on radius { NumberAnimation { @@ -506,7 +506,7 @@ Item { StyledText { text: rowItem.present.description font.pixelSize: Theme.fontSizeSmall - color: rowItem.isEnabled ? Theme.outline : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.6) + color: rowItem.isEnabled ? Theme.outline : Theme.outlineVariant elide: Text.ElideRight width: parent.width visible: text.length > 0 diff --git a/quickshell/Modules/Settings/DesktopWidgetInstanceCard.qml b/quickshell/Modules/Settings/DesktopWidgetInstanceCard.qml index 4852d6b35..3690d90d3 100644 --- a/quickshell/Modules/Settings/DesktopWidgetInstanceCard.qml +++ b/quickshell/Modules/Settings/DesktopWidgetInstanceCard.qml @@ -97,7 +97,7 @@ SettingsCard { width: parent.width height: Theme.iconSizeLarge radius: Theme.cornerRadius - color: duplicateArea.containsMouse ? Theme.primaryHover : "transparent" + color: duplicateArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -134,7 +134,7 @@ SettingsCard { width: parent.width height: Theme.iconSizeLarge radius: Theme.cornerRadius - color: deleteArea.containsMouse ? Theme.errorHover : "transparent" + color: deleteArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) Row { anchors.left: parent.left diff --git a/quickshell/Modules/Settings/DesktopWidgetSettings/SystemMonitorSettings.qml b/quickshell/Modules/Settings/DesktopWidgetSettings/SystemMonitorSettings.qml index 5ff156fc2..1ee09215b 100644 --- a/quickshell/Modules/Settings/DesktopWidgetSettings/SystemMonitorSettings.qml +++ b/quickshell/Modules/Settings/DesktopWidgetSettings/SystemMonitorSettings.qml @@ -156,7 +156,7 @@ Column { height: 44 radius: Theme.cornerRadius color: isSelected ? Theme.primarySelected : Theme.surfaceHover - border.color: isSelected ? Theme.primary : "transparent" + border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: 2 Row { diff --git a/quickshell/Modules/Settings/DisplayConfig/HyprlandOutputSettings.qml b/quickshell/Modules/Settings/DisplayConfig/HyprlandOutputSettings.qml index 13cbc32f1..b190a0cd6 100644 --- a/quickshell/Modules/Settings/DisplayConfig/HyprlandOutputSettings.qml +++ b/quickshell/Modules/Settings/DisplayConfig/HyprlandOutputSettings.qml @@ -15,7 +15,7 @@ Column { Rectangle { width: parent.width height: headerRow.implicitHeight + Theme.spacingS * 2 - color: headerMouse.containsMouse ? Theme.withAlpha(Theme.primary, 0.1) : "transparent" + color: headerMouse.containsMouse ? Theme.withAlpha(Theme.primary, 0.1) : Theme.withAlpha(Theme.primary, 0) radius: Theme.cornerRadius / 2 Row { diff --git a/quickshell/Modules/Settings/DisplayConfig/IncludeWarningBox.qml b/quickshell/Modules/Settings/DisplayConfig/IncludeWarningBox.qml index b5d8f29b7..2a57a152f 100644 --- a/quickshell/Modules/Settings/DisplayConfig/IncludeWarningBox.qml +++ b/quickshell/Modules/Settings/DisplayConfig/IncludeWarningBox.qml @@ -16,8 +16,8 @@ StyledRect { readonly property bool showError: !showLegacy && DisplayConfigState.includeStatus.exists && !DisplayConfigState.includeStatus.included readonly property bool showSetup: !showLegacy && !DisplayConfigState.includeStatus.exists && !DisplayConfigState.includeStatus.included - color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : "transparent" - border.color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : "transparent" + color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : Theme.withAlpha(Theme.primary, 0) + border.color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.primary, 0) border.width: 1 visible: (showLegacy || showError || showSetup) && DisplayConfigState.hasOutputBackend && !DisplayConfigState.checkingInclude diff --git a/quickshell/Modules/Settings/DisplayConfig/NiriOutputSettings.qml b/quickshell/Modules/Settings/DisplayConfig/NiriOutputSettings.qml index c0d462e6c..c2edbc774 100644 --- a/quickshell/Modules/Settings/DisplayConfig/NiriOutputSettings.qml +++ b/quickshell/Modules/Settings/DisplayConfig/NiriOutputSettings.qml @@ -15,7 +15,7 @@ Column { Rectangle { width: parent.width height: headerRow.implicitHeight + Theme.spacingS * 2 - color: headerMouse.containsMouse ? Theme.withAlpha(Theme.primary, 0.1) : "transparent" + color: headerMouse.containsMouse ? Theme.withAlpha(Theme.primary, 0.1) : Theme.withAlpha(Theme.primary, 0) radius: Theme.cornerRadius / 2 Row { diff --git a/quickshell/Modules/Settings/DisplayConfig/NoBackendMessage.qml b/quickshell/Modules/Settings/DisplayConfig/NoBackendMessage.qml index 93ab12470..67a16fb16 100644 --- a/quickshell/Modules/Settings/DisplayConfig/NoBackendMessage.qml +++ b/quickshell/Modules/Settings/DisplayConfig/NoBackendMessage.qml @@ -12,7 +12,7 @@ StyledRect { height: messageContent.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { diff --git a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml index 134d6a2e8..0a894baa5 100644 --- a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml +++ b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml @@ -95,7 +95,7 @@ StyledRect { width: 28 height: 28 radius: Theme.cornerRadius - color: deleteArea.containsMouse ? Theme.errorHover : "transparent" + color: deleteArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.verticalCenter: parent.verticalCenter DankIcon { diff --git a/quickshell/Modules/Settings/DisplayConfigTab.qml b/quickshell/Modules/Settings/DisplayConfigTab.qml index 0ea55055a..438b142b5 100644 --- a/quickshell/Modules/Settings/DisplayConfigTab.qml +++ b/quickshell/Modules/Settings/DisplayConfigTab.qml @@ -104,7 +104,7 @@ Item { height: profileSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 visible: DisplayConfigState.hasOutputBackend @@ -429,7 +429,7 @@ Item { height: monitorConfigSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 visible: DisplayConfigState.hasOutputBackend diff --git a/quickshell/Modules/Settings/DisplayWidgetsTab.qml b/quickshell/Modules/Settings/DisplayWidgetsTab.qml index cf374f359..e5d4b591b 100644 --- a/quickshell/Modules/Settings/DisplayWidgetsTab.qml +++ b/quickshell/Modules/Settings/DisplayWidgetsTab.qml @@ -137,7 +137,7 @@ Item { height: screensInfoSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { @@ -250,7 +250,7 @@ Item { height: screenRow.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3) + border.color: Theme.outlineHeavy border.width: 0 Row { @@ -331,7 +331,7 @@ Item { height: componentSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { diff --git a/quickshell/Modules/Settings/DockTab.qml b/quickshell/Modules/Settings/DockTab.qml index 09bbd28c2..b5ab3f196 100644 --- a/quickshell/Modules/Settings/DockTab.qml +++ b/quickshell/Modules/Settings/DockTab.qml @@ -343,7 +343,7 @@ Item { width: parent.width - selectButton.width - Theme.spacingM height: 36 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) + color: Theme.withAlpha(Theme.surfaceContainer, 0.9) border.color: Theme.outlineStrong border.width: 1 diff --git a/quickshell/Modules/Settings/GammaControlTab.qml b/quickshell/Modules/Settings/GammaControlTab.qml index 7d08c5afa..7061515c0 100644 --- a/quickshell/Modules/Settings/GammaControlTab.qml +++ b/quickshell/Modules/Settings/GammaControlTab.qml @@ -39,7 +39,7 @@ Item { height: gammaSection.implicitHeight + Theme.spacingL * 2 radius: Theme.cornerRadius color: Theme.surfaceContainerHigh - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: Theme.outlineHeavy border.width: 0 Column { diff --git a/quickshell/Modules/Settings/KeybindsTab.qml b/quickshell/Modules/Settings/KeybindsTab.qml index e5704feda..9152231c0 100644 --- a/quickshell/Modules/Settings/KeybindsTab.qml +++ b/quickshell/Modules/Settings/KeybindsTab.qml @@ -351,8 +351,8 @@ Item { readonly property bool showWarning: !showLegacy && status.included && status.overriddenBy > 0 readonly property bool showSetup: !showLegacy && !status.exists - color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : "transparent" - border.color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : "transparent" + color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : Theme.withAlpha(Theme.primary, 0) + border.color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.primary, 0) border.width: 1 visible: (showLegacy || showError || showWarning || showSetup) && !KeybindsService.loading diff --git a/quickshell/Modules/Settings/LauncherTab.qml b/quickshell/Modules/Settings/LauncherTab.qml index de4296025..982290b8d 100644 --- a/quickshell/Modules/Settings/LauncherTab.qml +++ b/quickshell/Modules/Settings/LauncherTab.qml @@ -364,7 +364,7 @@ Item { width: parent.width - selectButton.width - Theme.spacingM height: 36 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) + color: Theme.withAlpha(Theme.surfaceContainer, 0.9) border.color: Theme.outlineStrong border.width: 1 @@ -671,7 +671,7 @@ Item { onToggled: checked => SettingsData.set("dankLauncherV2UnloadOnClose", checked) } - SettingsToggleRow { + SettingsToggleRow { settingKey: "dankLauncherV2ShowSourceBadges" tags: ["launcher", "appearance", "badge", "source", "flatpak"] text: I18n.tr("Show Package Source Badges") @@ -789,7 +789,7 @@ Item { width: parent.width height: 56 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: Theme.withAlpha(Theme.surfaceContainer, 0.3) Row { anchors.left: parent.left @@ -957,7 +957,7 @@ Item { width: parent.width height: 52 radius: Theme.cornerRadius - color: visibilityDelegateItem.held ? Theme.surfaceHover : Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: visibilityDelegateItem.held ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceContainer, 0.3) Row { anchors.left: parent.left @@ -1219,7 +1219,7 @@ Item { width: hiddenAppsList.width height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: Theme.withAlpha(Theme.surfaceContainer, 0.3) border.width: 0 Row { @@ -1330,7 +1330,7 @@ Item { width: overridesList.width height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: Theme.withAlpha(Theme.surfaceContainer, 0.3) border.width: 0 Row { @@ -1467,7 +1467,7 @@ Item { width: rankedAppsList.width height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3) + color: Theme.withAlpha(Theme.surfaceContainer, 0.3) border.width: 0 Row { diff --git a/quickshell/Modules/Settings/NetworkEthernetTab.qml b/quickshell/Modules/Settings/NetworkEthernetTab.qml index 69ab27b30..452e547c8 100644 --- a/quickshell/Modules/Settings/NetworkEthernetTab.qml +++ b/quickshell/Modules/Settings/NetworkEthernetTab.qml @@ -71,7 +71,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Column { @@ -201,7 +201,7 @@ Item { width: 28 height: 28 radius: 14 - color: ethExpandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: ethExpandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) visible: isConnected DankIcon { @@ -231,7 +231,7 @@ Item { width: 28 height: 28 radius: 14 - color: ethDisconnectBtn.containsMouse ? Theme.errorHover : "transparent" + color: ethDisconnectBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) visible: isConnected DankIcon { @@ -381,7 +381,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } StyledText { diff --git a/quickshell/Modules/Settings/NetworkStatusTab.qml b/quickshell/Modules/Settings/NetworkStatusTab.qml index ec9c18637..9b55b63a0 100644 --- a/quickshell/Modules/Settings/NetworkStatusTab.qml +++ b/quickshell/Modules/Settings/NetworkStatusTab.qml @@ -61,7 +61,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Grid { diff --git a/quickshell/Modules/Settings/NetworkVpnTab.qml b/quickshell/Modules/Settings/NetworkVpnTab.qml index 2714cab92..8f52f9cfb 100644 --- a/quickshell/Modules/Settings/NetworkVpnTab.qml +++ b/quickshell/Modules/Settings/NetworkVpnTab.qml @@ -191,7 +191,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong visible: DMSNetworkService.vpnAvailable } @@ -320,7 +320,7 @@ Item { width: 28 height: 28 radius: 14 - color: vpnExpandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: vpnExpandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) anchors.verticalCenter: parent.verticalCenter visible: canExpand @@ -351,7 +351,7 @@ Item { width: 28 height: 28 radius: 14 - color: vpnDeleteBtn.containsMouse ? Theme.errorHover : "transparent" + color: vpnDeleteBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.verticalCenter: parent.verticalCenter visible: canDelete diff --git a/quickshell/Modules/Settings/NetworkWifiTab.qml b/quickshell/Modules/Settings/NetworkWifiTab.qml index fa735c904..bc91a3e89 100644 --- a/quickshell/Modules/Settings/NetworkWifiTab.qml +++ b/quickshell/Modules/Settings/NetworkWifiTab.qml @@ -259,7 +259,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong visible: NetworkService.wifiEnabled } @@ -622,7 +622,7 @@ Item { width: 28 height: 28 radius: 14 - color: wifiExpandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: wifiExpandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) visible: isConnected || modelData.saved DankIcon { @@ -991,7 +991,7 @@ Item { width: 28 height: 28 radius: 14 - color: savedWifiExpandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: savedWifiExpandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) visible: !isOutOfRange DankIcon { @@ -1202,7 +1202,7 @@ Item { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1228,7 +1228,7 @@ Item { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: parent.hovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) radius: Theme.cornerRadius / 2 } @@ -1250,7 +1250,7 @@ Item { } background: Rectangle { - color: parent.hovered ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.08) : "transparent" + color: parent.hovered ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) radius: Theme.cornerRadius / 2 } diff --git a/quickshell/Modules/Settings/NotificationsTab.qml b/quickshell/Modules/Settings/NotificationsTab.qml index 409463292..e98fe4dab 100644 --- a/quickshell/Modules/Settings/NotificationsTab.qml +++ b/quickshell/Modules/Settings/NotificationsTab.qml @@ -200,7 +200,6 @@ Item { anchors.horizontalCenter: parent.horizontalCenter spacing: Theme.spacingXL - SettingsCard { width: parent.width iconName: "notifications" @@ -314,9 +313,7 @@ Item { settingKey: "notificationDedupeEnabled" tags: ["notification", "duplicate", "dedupe", "stack", "coalesce", "repeat"] text: I18n.tr("Suppress Duplicate Notifications") - description: SettingsData.notificationDedupeEnabled - ? I18n.tr("Identical alerts show as one popup instead of stacking") - : I18n.tr("Identical alerts stack as separate notification cards") + description: SettingsData.notificationDedupeEnabled ? I18n.tr("Identical alerts show as one popup instead of stacking") : I18n.tr("Identical alerts stack as separate notification cards") checked: SettingsData.notificationDedupeEnabled onToggled: checked => SettingsData.set("notificationDedupeEnabled", checked) } @@ -542,7 +539,7 @@ Item { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : "transparent" + color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : Theme.withAlpha(Theme.error, 0) } DankIcon { @@ -739,7 +736,7 @@ Item { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : "transparent" + color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : Theme.withAlpha(Theme.error, 0) } DankIcon { diff --git a/quickshell/Modules/Settings/PluginListItem.qml b/quickshell/Modules/Settings/PluginListItem.qml index 87a1265a1..83f51766b 100644 --- a/quickshell/Modules/Settings/PluginListItem.qml +++ b/quickshell/Modules/Settings/PluginListItem.qml @@ -142,7 +142,7 @@ StyledRect { DankIcon { name: root.showSettings ? (root.isExpanded ? "expand_less" : "expand_more") : "" size: 16 - color: root.showSettings ? Theme.primary : "transparent" + color: root.showSettings ? Theme.primary : Theme.withAlpha(Theme.primary, 0) anchors.verticalCenter: parent.verticalCenter visible: root.showSettings } @@ -183,7 +183,7 @@ StyledRect { width: 28 height: 28 radius: 14 - color: updateArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: updateArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) visible: DMSService.dmsAvailable && root.isLoaded && root.hasUpdate && !root.isSystemPlugin DankIcon { @@ -227,7 +227,7 @@ StyledRect { width: 28 height: 28 radius: 14 - color: uninstallArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: uninstallArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) visible: DMSService.dmsAvailable && !root.isSystemPlugin DankIcon { @@ -270,7 +270,7 @@ StyledRect { width: 28 height: 28 radius: 14 - color: reloadArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" + color: reloadArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) visible: root.isLoaded DankIcon { diff --git a/quickshell/Modules/Settings/PrinterTab.qml b/quickshell/Modules/Settings/PrinterTab.qml index b2c63a5b9..ee7e392ef 100644 --- a/quickshell/Modules/Settings/PrinterTab.qml +++ b/quickshell/Modules/Settings/PrinterTab.qml @@ -173,7 +173,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Grid { @@ -286,7 +286,7 @@ Item { width: 28 height: 28 radius: 14 - color: addPrinterToggleArea.containsMouse ? Theme.surfacePressed : "transparent" + color: addPrinterToggleArea.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) anchors.verticalCenter: parent.verticalCenter DankIcon { @@ -324,7 +324,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Row { @@ -900,7 +900,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Item { @@ -1049,7 +1049,7 @@ Item { width: 28 height: 28 radius: 14 - color: expandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: expandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) DankIcon { anchors.centerIn: parent @@ -1073,7 +1073,7 @@ Item { width: 28 height: 28 radius: 14 - color: deleteBtn.containsMouse ? Theme.errorHover : "transparent" + color: deleteBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) DankIcon { anchors.centerIn: parent @@ -1459,7 +1459,7 @@ Item { width: 24 height: 24 radius: 12 - color: holdJobBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: holdJobBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) visible: modelData.state === "pending" DankIcon { @@ -1482,7 +1482,7 @@ Item { width: 24 height: 24 radius: 12 - color: restartJobBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: restartJobBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) visible: modelData.state === "pending-held" || modelData.state === "completed" || modelData.state === "aborted" DankIcon { @@ -1505,7 +1505,7 @@ Item { width: 24 height: 24 radius: 12 - color: cancelJobBtn.containsMouse ? Theme.errorHover : "transparent" + color: cancelJobBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) DankIcon { anchors.centerIn: parent @@ -1596,7 +1596,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Column { @@ -1659,7 +1659,7 @@ Item { width: 28 height: 28 radius: 14 - color: deleteClassBtn.containsMouse ? Theme.errorHover : "transparent" + color: deleteClassBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) DankIcon { anchors.centerIn: parent diff --git a/quickshell/Modules/Settings/RunningAppsTab.qml b/quickshell/Modules/Settings/RunningAppsTab.qml index 022e131da..f3b47f8b6 100644 --- a/quickshell/Modules/Settings/RunningAppsTab.qml +++ b/quickshell/Modules/Settings/RunningAppsTab.qml @@ -126,7 +126,7 @@ Item { Rectangle { anchors.fill: parent radius: Theme.cornerRadius - color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : "transparent" + color: deleteArea.containsMouse ? Theme.withAlpha(Theme.error, 0.2) : Theme.withAlpha(Theme.error, 0) } DankIcon { diff --git a/quickshell/Modules/Settings/SoundsTab.qml b/quickshell/Modules/Settings/SoundsTab.qml index 453f0d61c..15b7d617e 100644 --- a/quickshell/Modules/Settings/SoundsTab.qml +++ b/quickshell/Modules/Settings/SoundsTab.qml @@ -155,7 +155,7 @@ Item { width: parent.width height: notAvailableText.implicitHeight + Theme.spacingM * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) + color: Theme.warningHover visible: !AudioService.soundsAvailable Row { diff --git a/quickshell/Modules/Settings/SystemUpdaterTab.qml b/quickshell/Modules/Settings/SystemUpdaterTab.qml index f59c92598..fd5192e56 100644 --- a/quickshell/Modules/Settings/SystemUpdaterTab.qml +++ b/quickshell/Modules/Settings/SystemUpdaterTab.qml @@ -147,7 +147,7 @@ Item { visible: SettingsData.updaterUseCustomCommand height: warnText.implicitHeight + Theme.spacingS * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) + color: Theme.warningHover StyledText { id: warnText diff --git a/quickshell/Modules/Settings/ThemeBrowser.qml b/quickshell/Modules/Settings/ThemeBrowser.qml index 67bc9bd0a..11c2c05e4 100644 --- a/quickshell/Modules/Settings/ThemeBrowser.qml +++ b/quickshell/Modules/Settings/ThemeBrowser.qml @@ -387,8 +387,8 @@ FloatingWindow { return baseDir + "/preview-" + mode + ".svg"; } property bool hasPreview: previewImage.status === Image.Ready - color: isSelected ? Theme.primarySelected : Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.3) - border.color: isSelected ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: isSelected ? Theme.primarySelected : Theme.withAlpha(Theme.surfaceVariant, 0.3) + border.color: isSelected ? Theme.primary : Theme.outlineHeavy border.width: isSelected ? 2 : 1 Row { @@ -445,7 +445,7 @@ FloatingWindow { height: 18 width: versionText.implicitWidth + Theme.spacingS radius: 9 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.15) + color: Theme.outlineStrong anchors.verticalCenter: parent.verticalCenter StyledText { @@ -461,8 +461,8 @@ FloatingWindow { height: 18 width: firstPartyText.implicitWidth + Theme.spacingS radius: 9 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) - border.color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) + color: Theme.primaryPressed + border.color: Theme.withAlpha(Theme.primary, 0.4) border.width: 1 visible: isFirstParty anchors.verticalCenter: parent.verticalCenter @@ -481,8 +481,8 @@ FloatingWindow { height: 18 width: variantsText.implicitWidth + Theme.spacingS radius: 9 - color: Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.15) - border.color: Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.4) + color: Theme.withAlpha(Theme.secondary, 0.15) + border.color: Theme.withAlpha(Theme.secondary, 0.4) border.width: 1 visible: themeDelegate.hasVariants anchors.verticalCenter: parent.verticalCenter @@ -595,7 +595,7 @@ FloatingWindow { color: isInstalled ? (uninstallMouseArea.containsMouse ? Theme.error : Theme.surfaceVariant) : Theme.primary opacity: installMouseArea.containsMouse || uninstallMouseArea.containsMouse ? 0.9 : 1 border.width: isInstalled ? 1 : 0 - border.color: isInstalled ? (uninstallMouseArea.containsMouse ? Theme.error : Theme.outline) : "transparent" + border.color: isInstalled ? (uninstallMouseArea.containsMouse ? Theme.error : Theme.outline) : Theme.withAlpha(Theme.outline, 0) Behavior on opacity { NumberAnimation { diff --git a/quickshell/Modules/Settings/ThemeColorsTab.qml b/quickshell/Modules/Settings/ThemeColorsTab.qml index 6b15ba55d..139ef22a0 100644 --- a/quickshell/Modules/Settings/ThemeColorsTab.qml +++ b/quickshell/Modules/Settings/ThemeColorsTab.qml @@ -486,7 +486,7 @@ Item { anchors.fill: parent anchors.margins: 1 radius: Theme.cornerRadius - 1 - color: Theme.wallpaperPath && Theme.wallpaperPath.startsWith("#") ? Theme.wallpaperPath : "transparent" + color: Theme.wallpaperPath && Theme.wallpaperPath.startsWith("#") ? Theme.wallpaperPath : Theme.withAlpha(Theme.wallpaperPath, 0) visible: Theme.wallpaperPath && Theme.wallpaperPath.startsWith("#") } @@ -614,7 +614,7 @@ Item { buttonSize: 48 iconName: "folder_open" iconSize: Theme.iconSize - backgroundColor: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + backgroundColor: Theme.primaryHover iconColor: Theme.primary onClicked: fileBrowserModal.open() } @@ -2084,8 +2084,8 @@ Item { readonly property bool showError: themeColorsTab.cursorIncludeStatus.exists && !themeColorsTab.cursorIncludeStatus.included readonly property bool showSetup: !themeColorsTab.cursorIncludeStatus.exists && !themeColorsTab.cursorIncludeStatus.included - color: (showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.15) : "transparent" - border.color: (showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.3) : "transparent" + color: (showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.15) : Theme.withAlpha(Theme.warning, 0) + border.color: (showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.3) : Theme.withAlpha(Theme.warning, 0) border.width: 1 visible: (showError || showSetup) && !themeColorsTab.checkingCursorInclude @@ -2732,7 +2732,7 @@ Item { width: parent.width height: warningText.implicitHeight + Theme.spacingM * 2 radius: Theme.cornerRadius - color: Qt.rgba(Theme.warning.r, Theme.warning.g, Theme.warning.b, 0.12) + color: Theme.warningHover Row { anchors.fill: parent @@ -2773,7 +2773,7 @@ Item { width: (parent.width - Theme.spacingM) / 2 height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + color: Theme.primaryHover Row { anchors.centerIn: parent @@ -2807,7 +2807,7 @@ Item { width: (parent.width - Theme.spacingM) / 2 height: 48 radius: Theme.cornerRadius - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) + color: Theme.primaryHover Row { anchors.centerIn: parent diff --git a/quickshell/Modules/Settings/TimeWeatherTab.qml b/quickshell/Modules/Settings/TimeWeatherTab.qml index 975f35e7d..97d808e4e 100644 --- a/quickshell/Modules/Settings/TimeWeatherTab.qml +++ b/quickshell/Modules/Settings/TimeWeatherTab.qml @@ -671,14 +671,14 @@ Item { DankIcon { name: "cloud_off" size: Theme.iconSize * 2 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary anchors.horizontalCenter: parent.horizontalCenter } StyledText { text: I18n.tr("No Weather Data Available") font.pixelSize: Theme.fontSizeLarge - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } } @@ -696,7 +696,7 @@ Item { id: refreshButton name: "refresh" size: Theme.iconSize - 4 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.4) + color: Theme.onSurface_38 anchors.right: parent.right anchors.top: parent.top smoothTransform: isRefreshing @@ -782,7 +782,7 @@ Item { id: unitText text: SettingsData.useFahrenheit ? "F" : "C" font.pixelSize: Theme.fontSizeMedium - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.left: tempText.right anchors.leftMargin: Theme.spacingXS anchors.verticalCenter: parent.verticalCenter @@ -804,13 +804,13 @@ Item { property var feelsLike: SettingsData.useFahrenheit ? (WeatherService.weather.feelsLikeF || WeatherService.weather.tempF) : (WeatherService.weather.feelsLike || WeatherService.weather.temp) text: I18n.tr("Feels Like %1°").arg(feelsLike) font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5) + color: Theme.surfaceTextSecondary } StyledText { text: WeatherService.weather.city || "" font.pixelSize: Theme.fontSizeMedium - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium visible: text.length > 0 } } @@ -831,7 +831,7 @@ Item { id: sunriseIcon name: "wb_twilight" size: Theme.iconSize - 6 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter } @@ -840,7 +840,7 @@ Item { id: sunriseText text: WeatherService.weather.sunrise || "" font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary anchors.left: sunriseIcon.right anchors.leftMargin: Theme.spacingXS anchors.verticalCenter: parent.verticalCenter @@ -855,7 +855,7 @@ Item { id: sunsetIcon name: "bedtime" size: Theme.iconSize - 6 - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter } @@ -864,7 +864,7 @@ Item { id: sunsetText text: WeatherService.weather.sunset || "" font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6) + color: Theme.surfaceTextSecondary anchors.left: sunsetIcon.right anchors.leftMargin: Theme.spacingXS anchors.verticalCenter: parent.verticalCenter @@ -877,7 +877,7 @@ Item { Rectangle { width: parent.width height: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + color: Theme.outlineStrong } GridLayout { @@ -901,7 +901,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -917,7 +917,7 @@ Item { StyledText { text: I18n.tr("Feels Like") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { @@ -945,7 +945,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -961,7 +961,7 @@ Item { StyledText { text: I18n.tr("Humidity") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { @@ -989,7 +989,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -1005,7 +1005,7 @@ Item { StyledText { text: I18n.tr("Wind") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { @@ -1046,7 +1046,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -1062,7 +1062,7 @@ Item { StyledText { text: I18n.tr("Pressure") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { @@ -1096,7 +1096,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -1112,7 +1112,7 @@ Item { StyledText { text: I18n.tr("Rain Chance") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { @@ -1140,7 +1140,7 @@ Item { width: 32 height: 32 radius: 16 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover anchors.horizontalCenter: parent.horizontalCenter DankIcon { anchors.centerIn: parent @@ -1156,7 +1156,7 @@ Item { StyledText { text: I18n.tr("Visibility") font.pixelSize: Theme.fontSizeSmall - color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7) + color: Theme.surfaceTextMedium anchors.horizontalCenter: parent.horizontalCenter } StyledText { diff --git a/quickshell/Modules/Settings/WidgetSelectionPopup.qml b/quickshell/Modules/Settings/WidgetSelectionPopup.qml index f87a93a4c..54530a85e 100644 --- a/quickshell/Modules/Settings/WidgetSelectionPopup.qml +++ b/quickshell/Modules/Settings/WidgetSelectionPopup.qml @@ -24,10 +24,14 @@ FloatingWindow { function translateSection(section) { switch (section.toLowerCase()) { - case "left": return I18n.tr("Left Section"); - case "center": return I18n.tr("Center Section"); - case "right": return I18n.tr("Right Section"); - default: return section; + case "left": + return I18n.tr("Left Section"); + case "center": + return I18n.tr("Center Section"); + case "right": + return I18n.tr("Right Section"); + default: + return section; } } @@ -108,7 +112,7 @@ FloatingWindow { minimumSize: Qt.size(400, 350) implicitWidth: 500 implicitHeight: 550 - color: blurActive ? "transparent" : Theme.surfaceContainer + color: blurActive ? Theme.withAlpha(Theme.surfaceContainer, 0) : Theme.surfaceContainer visible: false onVisibleChanged: { @@ -146,7 +150,7 @@ FloatingWindow { anchors.fill: parent radius: Theme.cornerRadius color: Theme.withAlpha(Theme.surfaceContainer, root.surfaceAlpha) - border.color: root.blurActive ? Theme.outlineMedium : "transparent" + border.color: root.blurActive ? Theme.outlineMedium : Theme.withAlpha(Theme.outlineMedium, 0) border.width: root.blurActive ? Theme.layerOutlineWidth : 0 antialiasing: true } diff --git a/quickshell/Modules/Settings/Widgets/DeviceAliasRow.qml b/quickshell/Modules/Settings/Widgets/DeviceAliasRow.qml index bec5ff1f6..77a28f192 100644 --- a/quickshell/Modules/Settings/Widgets/DeviceAliasRow.qml +++ b/quickshell/Modules/Settings/Widgets/DeviceAliasRow.qml @@ -24,7 +24,7 @@ Rectangle { width: parent?.width ?? 0 height: deviceRowContent.height + Theme.spacingM * 2 radius: Theme.cornerRadius - color: deviceMouseArea.containsMouse ? Theme.surfaceHover : "transparent" + color: deviceMouseArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0) readonly property bool hasCustomAlias: AudioService.hasDeviceAlias(deviceNode?.name ?? "") readonly property string displayedName: AudioService.displayName(deviceNode) diff --git a/quickshell/Modules/Settings/Widgets/SettingsColorPicker.qml b/quickshell/Modules/Settings/Widgets/SettingsColorPicker.qml index 68011faf8..3e64b4c6d 100644 --- a/quickshell/Modules/Settings/Widgets/SettingsColorPicker.qml +++ b/quickshell/Modules/Settings/Widgets/SettingsColorPicker.qml @@ -62,7 +62,7 @@ Item { height: 60 radius: Theme.cornerRadius color: root.colorMode === modelData.id ? Theme.primarySelected : Theme.surfaceHover - border.color: root.colorMode === modelData.id ? Theme.primary : "transparent" + border.color: root.colorMode === modelData.id ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: 2 Column { diff --git a/quickshell/Modules/Settings/Widgets/SystemMonitorVariantCard.qml b/quickshell/Modules/Settings/Widgets/SystemMonitorVariantCard.qml index 1ecd45185..59bbb74b1 100644 --- a/quickshell/Modules/Settings/Widgets/SystemMonitorVariantCard.qml +++ b/quickshell/Modules/Settings/Widgets/SystemMonitorVariantCard.qml @@ -94,7 +94,7 @@ Rectangle { width: 32 height: 32 radius: 16 - color: deleteMouse.containsMouse ? Theme.error : "transparent" + color: deleteMouse.containsMouse ? Theme.error : Theme.withAlpha(Theme.error, 0) anchors.verticalCenter: parent.verticalCenter DankIcon { @@ -285,7 +285,7 @@ Rectangle { height: 40 radius: Theme.cornerRadius color: root.cfg.gpuPciId === modelData.pciId ? Theme.primarySelected : Theme.surfaceContainer - border.color: root.cfg.gpuPciId === modelData.pciId ? Theme.primary : "transparent" + border.color: root.cfg.gpuPciId === modelData.pciId ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: 2 Row { diff --git a/quickshell/Modules/Settings/WidgetsTabSection.qml b/quickshell/Modules/Settings/WidgetsTabSection.qml index 0b78050d4..5197eb4cf 100644 --- a/quickshell/Modules/Settings/WidgetsTabSection.qml +++ b/quickshell/Modules/Settings/WidgetsTabSection.qml @@ -239,8 +239,8 @@ Column { scale: delegateItem.dragging ? 1.02 : 1.0 transformOrigin: Item.Center radius: delegateItem.dragging ? Theme.cornerRadius + 6 : Theme.cornerRadius - color: delegateItem.dragging ? Theme.secondaryContainer : Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.8) - border.color: delegateItem.dragging ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: delegateItem.dragging ? Theme.secondaryContainer : Theme.withAlpha(Theme.surfaceContainer, 0.8) + border.color: delegateItem.dragging ? Theme.primary : Theme.outlineHeavy border.width: delegateItem.dragging ? 2 : 0 Behavior on scale { @@ -317,7 +317,7 @@ Column { return modelData.description; } font.pixelSize: Theme.fontSizeSmall - color: modelData.enabled ? Theme.outline : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.6) + color: modelData.enabled ? Theme.outline : Theme.outlineVariant elide: Text.ElideRight width: parent.width wrapMode: Text.WordWrap @@ -1070,8 +1070,8 @@ Column { width: 200 height: 40 radius: Theme.cornerRadius - color: addButtonArea.containsMouse ? Theme.primaryContainer : Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.3) - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + color: addButtonArea.containsMouse ? Theme.primaryContainer : Theme.withAlpha(Theme.surfaceVariant, 0.3) + border.color: Theme.outlineHeavy border.width: 0 anchors.horizontalCenter: parent.horizontalCenter @@ -1120,7 +1120,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -1134,7 +1134,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: swapToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: swapToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1187,7 +1187,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: gbToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: gbToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1257,7 +1257,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -1272,7 +1272,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: trayOverflowArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: trayOverflowArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1322,7 +1322,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: trayPopupLineArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: trayPopupLineArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) opacity: (trayContextMenu.currentWidgetData?.trayUseInlineExpansion ?? false) ? 0.55 : 1 Row { @@ -1376,7 +1376,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: trayAutoOverflowArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: trayAutoOverflowArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1426,7 +1426,7 @@ Column { width: parent.width height: 36 radius: Theme.cornerRadius - color: trayMaxVisibleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: trayMaxVisibleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) opacity: (trayContextMenu.currentWidgetData?.trayAutoOverflow ?? SettingsData.trayAutoOverflow) ? 1 : 0.55 Row { @@ -1521,7 +1521,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -1536,7 +1536,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: kbdLayoutCtxMenuIconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: kbdLayoutCtxMenuIconArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1606,7 +1606,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -1621,7 +1621,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: fwCompactArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: fwCompactArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1707,7 +1707,7 @@ Column { width: focusedWindowMenuColumn.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: focusedWindowOptionArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: focusedWindowOptionArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -1775,7 +1775,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -1834,7 +1834,7 @@ Column { width: diskMenuColumn.width height: 32 radius: Theme.cornerRadius - color: diskOptionArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: diskOptionArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) function isSelected() { return (diskUsageContextMenu.currentWidgetData?.diskUsageMode ?? 0) === modelData.mode; @@ -2148,7 +2148,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -2248,7 +2248,7 @@ Column { anchors.top: parent.top height: groupContent.implicitHeight + Theme.spacingXS * 2 radius: Theme.cornerRadius - color: isDragged ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.18) : (groupHoverArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent") + color: isDragged ? Theme.primaryPressed : (groupHoverArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0)) opacity: isDragged ? 0.75 : 1.0 } @@ -2308,7 +2308,7 @@ Column { height: 32 radius: Theme.cornerRadius opacity: rowEnabled ? 1.0 : 0.5 - color: rowHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" + color: rowHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) Row { anchors.left: parent.left @@ -2451,7 +2451,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -2489,7 +2489,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: micToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: micToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -2541,7 +2541,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: cameraToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: cameraToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -2593,7 +2593,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: screenshareToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: screenshareToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -2662,7 +2662,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -2683,7 +2683,7 @@ Column { width: gpuMenuColumn.width height: 40 radius: Theme.cornerRadius - color: gpuOptionArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: gpuOptionArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) property bool isSelected: { var selectedIdx = gpuContextMenu.widgetData ? (gpuContextMenu.widgetData.selectedGpuIndex !== undefined ? gpuContextMenu.widgetData.selectedGpuIndex : 0) : 0; @@ -2771,7 +2771,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -2786,7 +2786,7 @@ Column { width: parent.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: batteryPercentArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: batteryPercentArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -2839,7 +2839,7 @@ Column { width: parent.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: batteryPercentOnlyOnBatteryArea.containsMouse && batteryPercentToggle.checked ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: batteryPercentOnlyOnBatteryArea.containsMouse && batteryPercentToggle.checked ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) opacity: batteryPercentToggle.checked ? 1.0 : 0.5 Row { @@ -2895,7 +2895,7 @@ Column { width: parent.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: batteryTimeArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: batteryTimeArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -2948,7 +2948,7 @@ Column { width: parent.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: batteryTimeOnlyOnBatteryArea.containsMouse && batteryTimeToggle.checked ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: batteryTimeOnlyOnBatteryArea.containsMouse && batteryTimeToggle.checked ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) opacity: batteryTimeToggle.checked ? 1.0 : 0.5 Row { @@ -3020,7 +3020,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -3068,7 +3068,7 @@ Column { width: musicMenuColumn.width height: Math.max(18, Theme.fontSizeSmall) + Theme.spacingM * 2 radius: Theme.cornerRadius - color: musicOptionArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: musicOptionArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3137,7 +3137,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -3169,7 +3169,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: raCompactArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: raCompactArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3221,7 +3221,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: raGroupArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: raGroupArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3273,7 +3273,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: raWorkspaceArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: raWorkspaceArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3325,7 +3325,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: raDisplayArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: raDisplayArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3396,7 +3396,7 @@ Column { background: Rectangle { color: Theme.surfaceContainer radius: Theme.cornerRadius - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium border.width: 0 } @@ -3546,7 +3546,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: badgeToggleArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: badgeToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3615,7 +3615,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: hideIndicatorsArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: hideIndicatorsArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3668,7 +3668,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: colorizeActiveArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: colorizeActiveArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left @@ -3767,7 +3767,7 @@ Column { width: parent.width height: 32 radius: Theme.cornerRadius - color: enlargeOnHoverArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + color: enlargeOnHoverArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.primaryHover, 0) Row { anchors.left: parent.left diff --git a/quickshell/Modules/Settings/WindowRulesTab.qml b/quickshell/Modules/Settings/WindowRulesTab.qml index ea8492ed2..9d61a2c9a 100644 --- a/quickshell/Modules/Settings/WindowRulesTab.qml +++ b/quickshell/Modules/Settings/WindowRulesTab.qml @@ -475,8 +475,8 @@ Item { readonly property bool showError: !showLegacy && root.windowRulesIncludeStatus.exists && !root.windowRulesIncludeStatus.included readonly property bool showSetup: !showLegacy && !root.windowRulesIncludeStatus.exists && !root.windowRulesIncludeStatus.included - color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.15) : "transparent" - border.color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.3) : "transparent" + color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.15) : Theme.withAlpha(Theme.warning, 0) + border.color: (showLegacy || showError || showSetup) ? Theme.withAlpha(Theme.warning, 0.3) : Theme.withAlpha(Theme.warning, 0) border.width: 1 visible: (showLegacy || showError || showSetup) && !root.checkingInclude && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango) diff --git a/quickshell/Modules/Settings/WorkspacesTab.qml b/quickshell/Modules/Settings/WorkspacesTab.qml index e439d6a9a..cf750fa69 100644 --- a/quickshell/Modules/Settings/WorkspacesTab.qml +++ b/quickshell/Modules/Settings/WorkspacesTab.qml @@ -220,7 +220,7 @@ Item { width: parent.width height: workspaceIconRow.implicitHeight + Theme.spacingM radius: Theme.cornerRadius - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.5) + color: Theme.withAlpha(Theme.surfaceContainer, 0.5) border.width: 0 Row { diff --git a/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml b/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml index b8f242a47..54d41f6b1 100644 --- a/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml +++ b/quickshell/Modules/WorkspaceOverlays/OverviewWidget.qml @@ -222,7 +222,7 @@ Item { color: hoveredWhileDragging ? hoveredWorkspaceColor : defaultWorkspaceColor radius: Theme.cornerRadius border.width: 2 - border.color: hoveredWhileDragging ? hoveredBorderColor : (shouldShowActiveIndicator ? root.activeBorderColor : "transparent") + border.color: hoveredWhileDragging ? hoveredBorderColor : (shouldShowActiveIndicator ? root.activeBorderColor : Theme.withAlpha(root.activeBorderColor, 0)) StyledText { anchors.centerIn: parent diff --git a/quickshell/PLUGINS/ControlCenterDetailExample/DetailExampleWidget.qml b/quickshell/PLUGINS/ControlCenterDetailExample/DetailExampleWidget.qml index 7d6190053..a76975d31 100644 --- a/quickshell/PLUGINS/ControlCenterDetailExample/DetailExampleWidget.qml +++ b/quickshell/PLUGINS/ControlCenterDetailExample/DetailExampleWidget.qml @@ -1,6 +1,4 @@ import QtQuick -import QtQuick.Controls -import Quickshell import qs.Common import qs.Services import qs.Widgets @@ -16,17 +14,17 @@ PluginComponent { ccWidgetPrimaryText: "Detail Example" ccWidgetSecondaryText: { if (isEnabled) { - const selected = pluginData.selectedOption || "Option A" - return selected + const selected = pluginData.selectedOption || "Option A"; + return selected; } - return "Disabled" + return "Disabled"; } ccWidgetIsActive: isEnabled onCcWidgetToggled: { - isEnabled = !isEnabled + isEnabled = !isEnabled; if (pluginService) { - pluginService.savePluginData("controlCenterDetailExample", "isEnabled", isEnabled) + pluginService.savePluginData("controlCenterDetailExample", "isEnabled", isEnabled); } } @@ -68,8 +66,8 @@ PluginComponent { width: parent.width height: 40 radius: Theme.cornerRadius - color: optionMouseArea.containsMouse ? Theme.surfaceContainerHighest : "transparent" - border.color: detailRoot.currentSelection === modelData ? Theme.primary : "transparent" + color: optionMouseArea.containsMouse ? Theme.surfaceContainerHighest : Theme.withAlpha(Theme.surfaceContainerHighest, 0) + border.color: detailRoot.currentSelection === modelData ? Theme.primary : Theme.withAlpha(Theme.primary, 0) border.width: detailRoot.currentSelection === modelData ? 2 : 0 MouseArea { @@ -79,10 +77,10 @@ PluginComponent { cursorShape: Qt.PointingHandCursor z: 100 onClicked: { - SettingsData.setPluginSetting("controlCenterDetailExample", "selectedOption", modelData) - detailRoot.currentSelection = modelData - PluginService.pluginDataChanged("controlCenterDetailExample") - ToastService.showInfo("Option Selected", modelData) + SettingsData.setPluginSetting("controlCenterDetailExample", "selectedOption", modelData); + detailRoot.currentSelection = modelData; + PluginService.pluginDataChanged("controlCenterDetailExample"); + ToastService.showInfo("Option Selected", modelData); } } @@ -126,8 +124,8 @@ PluginComponent { StyledText { text: { - const selected = root.pluginData.selectedOption || "Option A" - return selected.substring(0, 1) + const selected = root.pluginData.selectedOption || "Option A"; + return selected.substring(0, 1); } color: root.isEnabled ? Theme.primary : Theme.surfaceVariantText font.pixelSize: Theme.fontSizeMedium diff --git a/quickshell/PLUGINS/ExampleWithVariants/VariantSettings.qml b/quickshell/PLUGINS/ExampleWithVariants/VariantSettings.qml index d5ea1d250..e1eb26f92 100644 --- a/quickshell/PLUGINS/ExampleWithVariants/VariantSettings.qml +++ b/quickshell/PLUGINS/ExampleWithVariants/VariantSettings.qml @@ -1,5 +1,4 @@ import QtQuick -import QtQuick.Controls import qs.Common import qs.Services import qs.Widgets @@ -10,9 +9,9 @@ PluginSettings { pluginId: "exampleVariants" onVariantsChanged: { - variantsModel.clear() + variantsModel.clear(); for (var i = 0; i < variants.length; i++) { - variantsModel.append(variants[i]) + variantsModel.append(variants[i]); } } @@ -112,21 +111,21 @@ PluginSettings { iconName: "add" onClicked: { if (!nameField.text) { - ToastService.showError("Please enter a variant name") - return + ToastService.showError("Please enter a variant name"); + return; } var variantConfig = { text: textField.text || nameField.text, icon: iconField.text || "widgets" - } + }; - createVariant(nameField.text, variantConfig) - ToastService.showInfo("Variant created: " + nameField.text) + createVariant(nameField.text, variantConfig); + ToastService.showInfo("Variant created: " + nameField.text); - nameField.text = "" - iconField.text = "" - textField.text = "" + nameField.text = ""; + iconField.text = ""; + textField.text = ""; } } } @@ -217,7 +216,7 @@ PluginSettings { width: 32 height: 32 radius: 16 - color: deleteArea.containsMouse ? Theme.error : "transparent" + color: deleteArea.containsMouse ? Theme.error : Theme.withAlpha(Theme.error, 0) anchors.verticalCenter: parent.verticalCenter DankIcon { @@ -233,8 +232,8 @@ PluginSettings { hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { - removeVariant(model.id) - ToastService.showInfo("Variant removed: " + model.name) + removeVariant(model.id); + ToastService.showInfo("Variant removed: " + model.name); } } } diff --git a/quickshell/PLUGINS/THEME_REFERENCE.md b/quickshell/PLUGINS/THEME_REFERENCE.md index be1373a06..8ac3cd6b5 100644 --- a/quickshell/PLUGINS/THEME_REFERENCE.md +++ b/quickshell/PLUGINS/THEME_REFERENCE.md @@ -44,6 +44,7 @@ Theme.cornerRadiusLarge // Larger radius ### Surface Colors ```qml Theme.surface +Theme.surfaceContainerLowest Theme.surfaceContainerLow Theme.surfaceContainer Theme.surfaceContainerHigh diff --git a/quickshell/Widgets/AppLauncherGridDelegate.qml b/quickshell/Widgets/AppLauncherGridDelegate.qml index f18bd94b6..6db8a4a19 100644 --- a/quickshell/Widgets/AppLauncherGridDelegate.qml +++ b/quickshell/Widgets/AppLauncherGridDelegate.qml @@ -33,7 +33,7 @@ Rectangle { width: cellWidth - 1 height: cellHeight - 1 radius: Theme.cornerRadius - color: currentIndex === index ? Theme.primaryPressed : mouseArea.containsMouse ? Theme.primaryPressed : "transparent" + color: currentIndex === index ? Theme.primaryPressed : mouseArea.containsMouse ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) Column { anchors.centerIn: parent diff --git a/quickshell/Widgets/AppLauncherListDelegate.qml b/quickshell/Widgets/AppLauncherListDelegate.qml index 281ad60d1..a569760cd 100644 --- a/quickshell/Widgets/AppLauncherListDelegate.qml +++ b/quickshell/Widgets/AppLauncherListDelegate.qml @@ -35,7 +35,7 @@ Rectangle { width: listView.width height: itemHeight radius: Theme.cornerRadius - color: isCurrentItem ? Theme.primaryPressed : mouseArea.containsMouse ? Theme.primaryPressed : "transparent" + color: isCurrentItem ? Theme.primaryPressed : mouseArea.containsMouse ? Theme.primaryPressed : Theme.withAlpha(Theme.primaryPressed, 0) Row { anchors.fill: parent diff --git a/quickshell/Widgets/DankBackdrop.qml b/quickshell/Widgets/DankBackdrop.qml index 3db7c0c49..417f75fd8 100644 --- a/quickshell/Widgets/DankBackdrop.qml +++ b/quickshell/Widgets/DankBackdrop.qml @@ -9,8 +9,8 @@ Item { property string screenName: "" property bool isColorWallpaper: { - var currentWallpaper = SessionData.getMonitorWallpaper(screenName) - return currentWallpaper && currentWallpaper.startsWith("#") + var currentWallpaper = SessionData.getMonitorWallpaper(screenName); + return currentWallpaper && currentWallpaper.startsWith("#"); } Rectangle { @@ -23,7 +23,7 @@ Item { y: -parent.height * 0.3 width: parent.width * 0.8 height: parent.height * 1.5 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15) + color: Theme.primaryPressed rotation: 35 visible: !isColorWallpaper } @@ -33,7 +33,7 @@ Item { y: -parent.height * 0.2 width: parent.width * 0.4 height: parent.height * 1.2 - color: Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.12) + color: Theme.secondaryHover rotation: 35 visible: !isColorWallpaper } diff --git a/quickshell/Widgets/DankCircularImage.qml b/quickshell/Widgets/DankCircularImage.qml index 36cbfe4bf..4aa341479 100644 --- a/quickshell/Widgets/DankCircularImage.qml +++ b/quickshell/Widgets/DankCircularImage.qml @@ -52,7 +52,7 @@ Rectangle { } radius: width / 2 - color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) + color: Theme.primaryHover border.color: "transparent" border.width: 0 diff --git a/quickshell/Widgets/DankColorSwatch.qml b/quickshell/Widgets/DankColorSwatch.qml index 586b68caa..9ce8ae308 100644 --- a/quickshell/Widgets/DankColorSwatch.qml +++ b/quickshell/Widgets/DankColorSwatch.qml @@ -8,7 +8,7 @@ Item { property color ringColor: Theme.outline property real minPreviewAlpha: 0.4 readonly property bool translucent: swatchColor.a > 0 && swatchColor.a < 1 - readonly property color displayColor: translucent ? Qt.rgba(swatchColor.r, swatchColor.g, swatchColor.b, Math.max(swatchColor.a, minPreviewAlpha)) : swatchColor + readonly property color displayColor: translucent ? Theme.withAlpha(swatchColor, Math.max(swatchColor.a, minPreviewAlpha)) : swatchColor Loader { anchors.fill: parent diff --git a/quickshell/Widgets/DankDropdown.qml b/quickshell/Widgets/DankDropdown.qml index 9aedde315..adf63cacd 100644 --- a/quickshell/Widgets/DankDropdown.qml +++ b/quickshell/Widgets/DankDropdown.qml @@ -159,7 +159,7 @@ Item { anchors.verticalCenter: parent.verticalCenter radius: Theme.cornerRadius color: dropdownArea.containsMouse || dropdownMenu.visible ? Theme.surfaceContainerHigh : (root.usePopupTransparency ? Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) : Theme.surfaceContainer) - border.color: dropdownMenu.visible ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.color: dropdownMenu.visible ? Theme.primary : Theme.outlineHeavy border.width: dropdownMenu.visible ? 2 : 1 MouseArea { @@ -350,7 +350,7 @@ Item { LayoutMirroring.enabled: I18n.isRtl LayoutMirroring.childrenInherit: true - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 1) + color: Theme.withAlpha(Theme.surfaceContainer, 1) border.color: Theme.primary border.width: 2 radius: Theme.cornerRadius @@ -481,7 +481,7 @@ Item { width: ListView.view.width height: 32 radius: Theme.cornerRadius - color: isSelected ? Theme.primaryHover : optionArea.containsMouse ? Theme.primaryHoverLight : "transparent" + color: isSelected ? Theme.primaryHover : optionArea.containsMouse ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryHoverLight, 0) Row { anchors.left: parent.left @@ -498,7 +498,7 @@ Item { height: 16 anchors.verticalCenter: parent.verticalCenter visible: delegateRoot.swatchColor !== undefined - swatchColor: visible ? delegateRoot.swatchColor : "transparent" + swatchColor: visible ? delegateRoot.swatchColor : Theme.withAlpha(delegateRoot.swatchColor, 0) ringColor: delegateRoot.isCurrentValue ? Theme.primary : Theme.outline } diff --git a/quickshell/Widgets/DankIconPicker.qml b/quickshell/Widgets/DankIconPicker.qml index 3738525b6..946bc5848 100644 --- a/quickshell/Widgets/DankIconPicker.qml +++ b/quickshell/Widgets/DankIconPicker.qml @@ -151,7 +151,7 @@ Rectangle { width: 24 height: 24 radius: 12 - color: closeMouseArea.containsMouse ? Theme.errorHover : "transparent" + color: closeMouseArea.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.top: parent.top anchors.right: parent.right anchors.topMargin: Theme.spacingS diff --git a/quickshell/Widgets/DankLocationSearch.qml b/quickshell/Widgets/DankLocationSearch.qml index d58538a8f..d8bc1af3c 100644 --- a/quickshell/Widgets/DankLocationSearch.qml +++ b/quickshell/Widgets/DankLocationSearch.qml @@ -210,7 +210,7 @@ Item { width: searchResultsList.width height: 36 radius: Theme.cornerRadius - color: resultMouseArea.containsMouse ? Theme.surfaceLight : "transparent" + color: resultMouseArea.containsMouse ? Theme.surfaceLight : Theme.withAlpha(Theme.surfaceLight, 0) Row { anchors.fill: parent diff --git a/quickshell/Widgets/DankPopoutConnected.qml b/quickshell/Widgets/DankPopoutConnected.qml index b2a041f56..48211ea59 100644 --- a/quickshell/Widgets/DankPopoutConnected.qml +++ b/quickshell/Widgets/DankPopoutConnected.qml @@ -1038,7 +1038,7 @@ Item { readonly property string connectedBarSide: barTop ? "top" : (barBottom ? "bottom" : (barLeft ? "left" : "right")) readonly property real surfaceRadius: root.usesConnectedSurfaceChrome ? Theme.connectedSurfaceRadius : Theme.cornerRadius readonly property color surfaceColor: root.usesConnectedSurfaceChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) - readonly property color surfaceBorderColor: root.usesConnectedSurfaceChrome ? "transparent" : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium) + readonly property color surfaceBorderColor: root.usesConnectedSurfaceChrome ? Theme.withAlpha(Theme.outlineMedium, 0) : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium) readonly property real surfaceBorderWidth: root.usesConnectedSurfaceChrome ? 0 : BlurService.borderWidth readonly property real surfaceTopLeftRadius: root.usesConnectedSurfaceChrome && (barTop || barLeft) ? 0 : surfaceRadius readonly property real surfaceTopRightRadius: root.usesConnectedSurfaceChrome && (barTop || barRight) ? 0 : surfaceRadius diff --git a/quickshell/Widgets/DankSeekbar.qml b/quickshell/Widgets/DankSeekbar.qml index 3bf7d6692..fa36728c3 100644 --- a/quickshell/Widgets/DankSeekbar.qml +++ b/quickshell/Widgets/DankSeekbar.qml @@ -142,7 +142,7 @@ Item { value: root.value actualValue: root.playerValue showActualPlaybackState: root.isSeeking - actualProgressColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.45) + actualProgressColor: Theme.onSurface_38 isPlaying: activePlayer && activePlayer.playbackState === MprisPlaybackState.Playing MouseArea { @@ -178,10 +178,10 @@ Item { Item { property real lineWidth: 3 - property color trackColor: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.40) + property color trackColor: Theme.withAlpha(Theme.surfaceVariant, 0.40) property color fillColor: Theme.primary property color playheadColor: Theme.primary - property color actualProgressColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.45) + property color actualProgressColor: Theme.onSurface_38 readonly property real midY: height / 2 Rectangle { diff --git a/quickshell/Widgets/DankSlideout.qml b/quickshell/Widgets/DankSlideout.qml index baf64b07f..6c5c9eb1b 100644 --- a/quickshell/Widgets/DankSlideout.qml +++ b/quickshell/Widgets/DankSlideout.qml @@ -187,7 +187,7 @@ PanelWindow { anchors.fill: parent color: contentRect.slideoutSurfaceColor radius: Theme.connectedSurfaceRadius - border.color: Theme.isConnectedEffect ? "transparent" : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium) + border.color: Theme.isConnectedEffect ? Theme.withAlpha(Theme.outlineMedium, 0) : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium) border.width: Theme.isConnectedEffect ? 0 : BlurService.borderWidth } diff --git a/quickshell/Widgets/DankTextField.qml b/quickshell/Widgets/DankTextField.qml index 287da007e..3ad7f6a25 100644 --- a/quickshell/Widgets/DankTextField.qml +++ b/quickshell/Widgets/DankTextField.qml @@ -213,7 +213,7 @@ StyledRect { width: 20 height: 20 radius: 10 - color: passwordToggleArea.containsMouse ? Theme.outlineStrong : "transparent" + color: passwordToggleArea.containsMouse ? Theme.outlineStrong : Theme.withAlpha(Theme.outlineStrong, 0) visible: showPasswordToggle DankIcon { @@ -239,7 +239,7 @@ StyledRect { width: 20 height: 20 radius: 10 - color: clearArea.containsMouse ? Theme.outlineStrong : "transparent" + color: clearArea.containsMouse ? Theme.outlineStrong : Theme.withAlpha(Theme.outlineStrong, 0) visible: showClearButton && text.length > 0 DankIcon { diff --git a/quickshell/Widgets/DankToggle.qml b/quickshell/Widgets/DankToggle.qml index 76c21caa1..d394d31f3 100644 --- a/quickshell/Widgets/DankToggle.qml +++ b/quickshell/Widgets/DankToggle.qml @@ -99,11 +99,11 @@ Item { radius: Theme.cornerRadius // Distinguish disabled checked vs unchecked so unchecked disabled switches don't look enabled - color: !toggle.enabled ? (toggle.checked ? Qt.alpha(Theme.surfaceText, 0.12) : "transparent") : (toggle.checked ? Theme.primary : Theme.surfaceVariantAlpha) + color: !toggle.enabled ? (toggle.checked ? Qt.alpha(Theme.surfaceText, 0.12) : Theme.withAlpha(Qt.alpha(Theme.surfaceText, 0.12), 0)) : (toggle.checked ? Theme.primary : Theme.surfaceVariantAlpha) opacity: toggle.toggling ? 0.6 : 1 // M3 disabled unchecked border: on surface 12% opacity - border.color: toggle.checked ? "transparent" : (!toggle.enabled ? Qt.alpha(Theme.surfaceText, 0.12) : Theme.outline) + border.color: toggle.checked ? Theme.withAlpha(Theme.outline, 0) : (!toggle.enabled ? Qt.alpha(Theme.surfaceText, 0.12) : Theme.outline) readonly property int pad: Math.round((height - thumb.width) / 2) readonly property int edgeLeft: pad @@ -119,8 +119,8 @@ Item { // M3 disabled thumb: // checked = solid surface | unchecked = outlined off-state thumb - color: !toggle.enabled ? (toggle.checked ? Theme.surface : "transparent") : (toggle.checked ? Theme.surface : Theme.outline) - border.color: !toggle.enabled ? (toggle.checked ? "transparent" : Qt.alpha(Theme.surfaceText, 0.38)) : Theme.outline + color: !toggle.enabled ? (toggle.checked ? Theme.surface : Theme.withAlpha(Theme.surface, 0)) : (toggle.checked ? Theme.surface : Theme.outline) + border.color: !toggle.enabled ? (toggle.checked ? Theme.withAlpha(Qt.alpha(Theme.surfaceText, 0.38), 0) : Qt.alpha(Theme.surfaceText, 0.38)) : Theme.outline border.width: (toggle.checked && toggle.enabled) ? 1 : 2 x: toggle.checked ? toggleTrack.edgeRight : toggleTrack.edgeLeft diff --git a/quickshell/Widgets/DankTooltip.qml b/quickshell/Widgets/DankTooltip.qml index 58f7b448a..bb9f3d0f1 100644 --- a/quickshell/Widgets/DankTooltip.qml +++ b/quickshell/Widgets/DankTooltip.qml @@ -79,7 +79,7 @@ PanelWindow { color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) radius: Theme.cornerRadius border.width: BlurService.enabled ? BlurService.borderWidth : 1 - border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium StyledText { id: textContent diff --git a/quickshell/Widgets/DankTooltipV2.qml b/quickshell/Widgets/DankTooltipV2.qml index b37e7c817..6cd53c8d9 100644 --- a/quickshell/Widgets/DankTooltipV2.qml +++ b/quickshell/Widgets/DankTooltipV2.qml @@ -114,7 +114,7 @@ Item { color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) radius: Theme.cornerRadius border.width: 1 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.color: Theme.outlineMedium } contentItem: Text { diff --git a/quickshell/Widgets/KeybindItem.qml b/quickshell/Widgets/KeybindItem.qml index 987056f20..8e32383ea 100644 --- a/quickshell/Widgets/KeybindItem.qml +++ b/quickshell/Widgets/KeybindItem.qml @@ -304,7 +304,7 @@ Item { topLeftRadius: Theme.cornerRadius topRightRadius: Theme.cornerRadius color: root.hasOverride ? Theme.surfaceContainer : Theme.surfaceContainerHighest - border.color: root.hasOverride ? Theme.outlineVariant : "transparent" + border.color: root.hasOverride ? Theme.outlineVariant : Theme.withAlpha(Theme.outlineVariant, 0) border.width: root.hasOverride ? 1 : 0 RowLayout { @@ -337,7 +337,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: chipArea.pressed ? Theme.surfaceTextHover : (chipArea.containsMouse ? Theme.surfaceTextHover : "transparent") + color: chipArea.pressed ? Theme.surfaceTextHover : (chipArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } StyledText { @@ -461,7 +461,7 @@ Item { width: parent ? parent.width : 0 height: expandedContent.implicitHeight + Theme.spacingL * 2 color: Theme.surfaceContainerHigh - border.color: root.hasOverride ? Theme.outlineVariant : "transparent" + border.color: root.hasOverride ? Theme.outlineVariant : Theme.withAlpha(Theme.outlineVariant, 0) border.width: root.hasOverride ? 1 : 0 bottomLeftRadius: Theme.cornerRadius bottomRightRadius: Theme.cornerRadius @@ -564,7 +564,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: editKeyChipArea.pressed ? Theme.surfaceTextHover : (editKeyChipArea.containsMouse && !parent.isSelected ? Theme.surfaceTextHover : "transparent") + color: editKeyChipArea.pressed ? Theme.surfaceTextHover : (editKeyChipArea.containsMouse && !parent.isSelected ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } StyledText { @@ -597,7 +597,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: addKeyArea.pressed ? Theme.surfaceTextHover : (addKeyArea.containsMouse && !root.addingNewKey ? Theme.surfaceTextHover : "transparent") + color: addKeyArea.pressed ? Theme.surfaceTextHover : (addKeyArea.containsMouse && !root.addingNewKey ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } DankIcon { @@ -653,7 +653,7 @@ Item { anchors.fill: parent radius: Theme.cornerRadius color: root.recording ? Theme.primaryContainer : Theme.surfaceContainer - border.color: root.recording ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3) + border.color: root.recording ? Theme.primary : Theme.outlineHeavy border.width: root.recording ? 2 : 1 Row { @@ -796,7 +796,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: singleAddKeyArea.pressed ? Theme.surfaceTextHover : (singleAddKeyArea.containsMouse && !root.addingNewKey ? Theme.surfaceTextHover : "transparent") + color: singleAddKeyArea.pressed ? Theme.surfaceTextHover : (singleAddKeyArea.containsMouse && !root.addingNewKey ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } DankIcon { @@ -873,7 +873,7 @@ Item { Layout.preferredHeight: root._buttonHeight radius: Theme.cornerRadius color: root._actionType === modelData.id ? Theme.surfaceContainerHighest : Theme.surfaceContainer - border.color: root._actionType === modelData.id ? Theme.outline : (typeArea.containsMouse ? Theme.outlineVariant : "transparent") + border.color: root._actionType === modelData.id ? Theme.outline : (typeArea.containsMouse ? Theme.outlineVariant : Theme.withAlpha(Theme.outlineVariant, 0)) border.width: 1 clip: true @@ -1216,7 +1216,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: customToggleArea.pressed ? Theme.surfaceTextHover : (customToggleArea.containsMouse ? Theme.surfaceTextHover : "transparent") + color: customToggleArea.pressed ? Theme.surfaceTextHover : (customToggleArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } DankIcon { @@ -1464,7 +1464,7 @@ Item { Rectangle { anchors.fill: parent radius: parent.radius - color: presetToggleArea.pressed ? Theme.surfaceTextHover : (presetToggleArea.containsMouse ? Theme.surfaceTextHover : "transparent") + color: presetToggleArea.pressed ? Theme.surfaceTextHover : (presetToggleArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0)) } DankIcon { @@ -1816,7 +1816,7 @@ Item { Rectangle { Layout.fillWidth: true Layout.preferredHeight: 1 - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1) + color: Theme.outlineStrong } RowLayout { diff --git a/quickshell/Widgets/M3WaveProgress.qml b/quickshell/Widgets/M3WaveProgress.qml index 051e092e3..d6ec1e450 100644 --- a/quickshell/Widgets/M3WaveProgress.qml +++ b/quickshell/Widgets/M3WaveProgress.qml @@ -14,10 +14,10 @@ Item { property real phase: 0.0 property bool isPlaying: false property real currentAmp: 1.6 - property color trackColor: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.40) + property color trackColor: Theme.withAlpha(Theme.surfaceVariant, 0.40) property color fillColor: Theme.primary property color playheadColor: Theme.primary - property color actualProgressColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.45) + property color actualProgressColor: Theme.onSurface_38 property real dpr: (root.window ? root.window.devicePixelRatio : 1) function snap(v) { diff --git a/quickshell/Widgets/StateLayer.qml b/quickshell/Widgets/StateLayer.qml index 8969d930d..9c7b4a2fa 100644 --- a/quickshell/Widgets/StateLayer.qml +++ b/quickshell/Widgets/StateLayer.qml @@ -27,7 +27,7 @@ MouseArea { id: stateRect anchors.fill: parent radius: root.cornerRadius - color: Qt.rgba(stateColor.r, stateColor.g, stateColor.b, stateOpacity) + color: Theme.withAlpha(stateColor, stateOpacity) Behavior on color { enabled: Theme.currentAnimationSpeed !== SettingsData.AnimationSpeed.None diff --git a/quickshell/Widgets/VpnDetailContent.qml b/quickshell/Widgets/VpnDetailContent.qml index 8a984f67c..d480b833d 100644 --- a/quickshell/Widgets/VpnDetailContent.qml +++ b/quickshell/Widgets/VpnDetailContent.qml @@ -156,7 +156,7 @@ Rectangle { Rectangle { height: 1 width: parent.width - color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) + color: Theme.outlineStrong } Item { diff --git a/quickshell/Widgets/VpnProfileDelegate.qml b/quickshell/Widgets/VpnProfileDelegate.qml index d3331a986..ce12a90dd 100644 --- a/quickshell/Widgets/VpnProfileDelegate.qml +++ b/quickshell/Widgets/VpnProfileDelegate.qml @@ -161,7 +161,7 @@ Rectangle { width: 28 height: 28 radius: 14 - color: expandBtn.containsMouse ? Theme.surfacePressed : "transparent" + color: expandBtn.containsMouse ? Theme.surfacePressed : Theme.withAlpha(Theme.surfacePressed, 0) anchors.verticalCenter: parent.verticalCenter visible: canExpand @@ -185,7 +185,7 @@ Rectangle { width: 28 height: 28 radius: 14 - color: deleteBtn.containsMouse ? Theme.errorHover : "transparent" + color: deleteBtn.containsMouse ? Theme.errorHover : Theme.withAlpha(Theme.errorHover, 0) anchors.verticalCenter: parent.verticalCenter visible: canDelete diff --git a/quickshell/translations/settings_search_index.json b/quickshell/translations/settings_search_index.json index 28a6494e8..dd9628c8f 100644 --- a/quickshell/translations/settings_search_index.json +++ b/quickshell/translations/settings_search_index.json @@ -6334,16 +6334,21 @@ "coalesce", "dedupe", "duplicate", + "identical", "messages", "notif", "notification", "notifications", "notifs", + "popup", "repeat", + "show", "stack", + "stacking", "suppress", "toast" - ] + ], + "description": "Identical alerts show as one popup instead of stacking" }, { "section": "notificationShowTimeoutBar",