diff options
| author | Kiran George <kirangeorge1995@gmail.com> | 2025-06-21 17:26:23 +0530 |
|---|---|---|
| committer | Kiran George <kirangeorge1995@gmail.com> | 2025-06-21 17:26:23 +0530 |
| commit | 0cda8f13953d0f4cc6126d4810c04452cc3375b8 (patch) | |
| tree | 3627d7b49135b1d98f018dccb019c8cefc1ff0e4 /config/quickshell/modules/overview | |
| parent | 1462996cc5256e6337eafc226423de5559214c7f (diff) | |
Refactored for better colour and font expose and cleaned up unused code
Diffstat (limited to 'config/quickshell/modules/overview')
4 files changed, 28 insertions, 28 deletions
diff --git a/config/quickshell/modules/overview/OverviewWidget.qml b/config/quickshell/modules/overview/OverviewWidget.qml index 63633602..2ea8d58a 100644 --- a/config/quickshell/modules/overview/OverviewWidget.qml +++ b/config/quickshell/modules/overview/OverviewWidget.qml @@ -25,7 +25,7 @@ Item { property var windowAddresses: HyprlandData.addresses property var monitorData: HyprlandData.monitors.find(m => m.id === root.monitor.id) property real scale: ConfigOptions.overview.scale - property color activeBorderColor: Appearance.m3colors.m3secondary + property color activeBorderColor: Appearance.m3colors.m3accentSecondary property real workspaceImplicitWidth: Math.max(100, (monitorData?.transform % 2 === 1) ? ((monitor.height - monitorData?.reserved[0] - monitorData?.reserved[2]) * root.scale / monitor.scale) : @@ -71,7 +71,7 @@ Item { property real padding: 10 anchors.fill: parent anchors.margins: Appearance.sizes.elevationMargin - border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.2) + border.color : ColorUtils.transparentize(Appearance.m3colors.m3borderPrimary, 0.2) border.width : 2 implicitWidth: workspaceColumnLayout.implicitWidth + padding * 2 @@ -170,7 +170,7 @@ Item { color: "transparent" radius: parent.radius border.width: 1 - border.color: hoveredWhileDragging ? hoveredBorderColor : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.6) + border.color: hoveredWhileDragging ? hoveredBorderColor : ColorUtils.transparentize(Appearance.m3colors.m3borderPrimary, 0.6) z: 10 // Ensure it's on top } diff --git a/config/quickshell/modules/overview/OverviewWindow.qml b/config/quickshell/modules/overview/OverviewWindow.qml index 273eff7e..449a98c4 100644 --- a/config/quickshell/modules/overview/OverviewWindow.qml +++ b/config/quickshell/modules/overview/OverviewWindow.qml @@ -32,7 +32,7 @@ Rectangle { // Window property var xwaylandIndicatorToIconRatio: 0.35 property var iconToWindowRatioCompact: 0.6 property var iconPath: Quickshell.iconPath(AppSearch.guessIcon(windowData?.class), "image-missing") - property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth + property bool compactMode: Appearance.font.pixelSize.textSmall * 4 > targetWindowHeight || Appearance.font.pixelSize.textSmall * 4 > targetWindowWidth property bool indicateXWayland: (ConfigOptions.overview.showXwaylandIndicator && windowData?.xwayland) ?? false @@ -44,7 +44,7 @@ Rectangle { // Window radius: Appearance.rounding.windowRounding * root.scale color: pressed ? Appearance.colors.colLayer2Active : hovered ? Appearance.colors.colLayer2Hover : Appearance.colors.colLayer2 // border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.9) - border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.4) + border.color : ColorUtils.transparentize(Appearance.m3colors.m3borderPrimary, 0.4) border.pixelAligned : false border.width : 2 @@ -65,7 +65,7 @@ Rectangle { // Window anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: parent.right - spacing: Appearance.font.pixelSize.smaller * 0.5 + spacing: Appearance.font.pixelSize.textSmall * 0.5 IconImage { id: windowIcon @@ -85,7 +85,7 @@ Rectangle { // Window Layout.fillWidth: true Layout.fillHeight: true horizontalAlignment: Text.AlignHCenter - font.pixelSize: Appearance.font.pixelSize.smaller + font.pixelSize: Appearance.font.pixelSize.textSmall font.italic: indicateXWayland ? true : false elide: Text.ElideRight text: windowData?.title ?? "" diff --git a/config/quickshell/modules/overview/SearchItem.qml b/config/quickshell/modules/overview/SearchItem.qml index 1363b88d..1357d03c 100644 --- a/config/quickshell/modules/overview/SearchItem.qml +++ b/config/quickshell/modules/overview/SearchItem.qml @@ -22,7 +22,7 @@ RippleButton { property string itemName: entry?.name property string itemIcon: entry?.icon ?? "" property var itemExecute: entry?.execute - property string fontType: entry?.fontType ?? "main" + property string fontType: entry?.fontType ?? "uiFont" property string itemClickActionName: entry?.clickActionName property string bigText: entry?.bigText ?? "" property string materialSymbol: entry?.materialSymbol ?? "" @@ -31,7 +31,7 @@ RippleButton { property string highlightPrefix: `<u><font color="${Appearance.colors.colPrimary}">` property string highlightSuffix: `</font></u>` function highlightContent(content, query) { - if (!query || query.length === 0 || content == query || fontType === "monospace") + if (!query || query.length === 0 || content == query || fontType === "codeFont") return StringUtils.escapeHtml(content); let contentLower = content.toLowerCase(); @@ -80,7 +80,7 @@ RippleButton { buttonRadius: Appearance.rounding.normal colBackground: (root.down || root.keyboardDown) ? Appearance.colors.colLayer1Active : ((root.hovered || root.focus) ? Appearance.colors.colLayer1Hover : - ColorUtils.transparentize(Appearance.m3colors.m3surfaceContainerHigh, 1)) + ColorUtils.transparentize(Appearance.m3colors.m3layerBackground3, 1)) colBackgroundHover: Appearance.colors.colLayer1Hover colRipple: Appearance.colors.colLayer1Active @@ -140,7 +140,7 @@ RippleButton { MaterialSymbol { text: root.materialSymbol iconSize: 30 - color: Appearance.m3colors.m3onSurface + color: Appearance.m3colors.m3surfaceText } } @@ -148,8 +148,8 @@ RippleButton { id: bigTextComponent StyledText { text: root.bigText - font.pixelSize: Appearance.font.pixelSize.larger - color: Appearance.m3colors.m3onSurface + font.pixelSize: Appearance.font.pixelSize.textLarge + color: Appearance.m3colors.m3surfaceText } } @@ -160,7 +160,7 @@ RippleButton { Layout.alignment: Qt.AlignVCenter spacing: 0 StyledText { - font.pixelSize: Appearance.font.pixelSize.smaller + font.pixelSize: Appearance.font.pixelSize.textSmall color: Appearance.colors.colSubtext visible: root.itemType && root.itemType != qsTr("App") text: root.itemType @@ -178,8 +178,8 @@ RippleButton { id: activeText anchors.centerIn: parent text: "check" - font.pixelSize: Appearance.font.pixelSize.normal - color: Appearance.m3colors.m3onPrimary + font.pixelSize: Appearance.font.pixelSize.textMedium + color: Appearance.m3colors.m3accentPrimaryText } } } @@ -187,9 +187,9 @@ RippleButton { Layout.fillWidth: true id: nameText textFormat: Text.StyledText // RichText also works, but StyledText ensures elide work - font.pixelSize: Appearance.font.pixelSize.small + font.pixelSize: Appearance.font.pixelSize.textBase font.family: Appearance.font.family[root.fontType] - color: Appearance.m3colors.m3onSurface + color: Appearance.m3colors.m3surfaceText horizontalAlignment: Text.AlignLeft elide: Text.ElideRight text: `${root.displayContent}` @@ -211,7 +211,7 @@ RippleButton { Layout.fillWidth: false visible: (root.hovered || root.focus) id: clickAction - font.pixelSize: Appearance.font.pixelSize.normal + font.pixelSize: Appearance.font.pixelSize.textMedium color: Appearance.colors.colSubtext horizontalAlignment: Text.AlignRight text: root.itemClickActionName diff --git a/config/quickshell/modules/overview/SearchWidget.qml b/config/quickshell/modules/overview/SearchWidget.qml index fed710ec..f84aa558 100644 --- a/config/quickshell/modules/overview/SearchWidget.qml +++ b/config/quickshell/modules/overview/SearchWidget.qml @@ -201,8 +201,8 @@ Item { // Wrapper MaterialSymbol { id: searchIcon Layout.leftMargin: 15 - iconSize: Appearance.font.pixelSize.huge - color: Appearance.m3colors.m3onSurface + iconSize: Appearance.font.pixelSize.iconLarge + color: Appearance.m3colors.m3surfaceText text: root.searchingText.startsWith(ConfigOptions.search.prefix.clipboard) ? 'content_paste_search' : '' } TextField { // Search box @@ -213,15 +213,15 @@ Item { // Wrapper padding: 15 renderType: Text.NativeRendering font { - family: Appearance?.font.family.main ?? "sans-serif" - pixelSize: Appearance?.font.pixelSize.small ?? 15 + family: Appearance?.font.family.uiFont ?? "sans-serif" + pixelSize: Appearance?.font.pixelSize.textBase ?? 15 hintingPreference: Font.PreferFullHinting } - color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant - selectedTextColor: Appearance.m3colors.m3onSecondaryContainer - selectionColor: Appearance.m3colors.m3secondaryContainer + color: activeFocus ? Appearance.m3colors.m3surfaceText : Appearance.m3colors.m3secondaryText + selectedTextColor: Appearance.m3colors.m3selectionText + selectionColor: Appearance.m3colors.m3selectionBackground placeholderText: qsTr("Search, calculate or run") - placeholderTextColor: Appearance.m3colors.m3outline + placeholderTextColor: Appearance.m3colors.m3borderPrimary implicitWidth: root.searchingText == "" ? Appearance.sizes.searchWidthCollapsed : Appearance.sizes.searchWidth Behavior on implicitWidth { @@ -260,7 +260,7 @@ Item { // Wrapper visible: root.showResults Layout.fillWidth: true height: 1 - color: Appearance.m3colors.m3outlineVariant + color: Appearance.m3colors.m3borderSecondary } ListView { // App results |
