From fdf61a0e903fb99dc1adba5a6025f3756fe433ab Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Tue, 16 Sep 2025 10:32:19 -0400 Subject: [PATCH 1/3] remove font family from theme --- config/Theme.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/Theme.qml b/config/Theme.qml index 596c9ac..bd09368 100644 --- a/config/Theme.qml +++ b/config/Theme.qml @@ -8,7 +8,6 @@ import Quickshell.Io Singleton { id: root - property string fontFamily: "JetBrainsMono Nerd Font" property var palette: theme.palette property alias themes: cache.themes From 7a04cccf0c262703ed713a800a3389cb83126c6d Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Tue, 16 Sep 2025 10:33:42 -0400 Subject: [PATCH 2/3] should use Styling --- modules/pomodoro/Pomodoro.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pomodoro/Pomodoro.qml b/modules/pomodoro/Pomodoro.qml index 034e479..eaa2d95 100644 --- a/modules/pomodoro/Pomodoro.qml +++ b/modules/pomodoro/Pomodoro.qml @@ -55,7 +55,7 @@ StyledPanelWindow { id: circle radius: 150 borderColor: Styling.theme.base100 - strokeColor: PomodoroService.state == "timer" ? Theme.palette.primary : Theme.palette.warning + strokeColor: PomodoroService.state == "timer" ? Styling.theme.primary : Styling.theme.warning strokeWidth: 12 fillColor: button.hovered ? Styling.theme.primary : "transparent" percentage: (PomodoroService.state == "timer" ? (PomodoroService.initialTime - PomodoroService.remainingTime) : PomodoroService.remainingTime) / PomodoroService.initialTime % 1 From c03d24de153fa426ea0d005d2971ee01273e0dcf Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Tue, 16 Sep 2025 10:33:55 -0400 Subject: [PATCH 3/3] create ThemeComboBox --- components/composite/ThemeComboBox.qml | 20 ++++++++++++++++++++ modules/configuration/StylingView.qml | 10 ++-------- 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 components/composite/ThemeComboBox.qml diff --git a/components/composite/ThemeComboBox.qml b/components/composite/ThemeComboBox.qml new file mode 100644 index 0000000..8ba673b --- /dev/null +++ b/components/composite/ThemeComboBox.qml @@ -0,0 +1,20 @@ +import qs.components +import qs.config +import QtQuick + +StyledComboBox { + id: control + + currentIndex: Theme.themes.indexOf(Theme.currentTheme) + model: Theme.themes + onActivated: index => { + Theme.currentTheme = Theme.themes[index]; + } + + Component.onCompleted: { + control.currentIndex = Theme.themes.indexOf(Theme.currentTheme); + Theme.onCurrentThemeChanged = () => { + Theme.themes.indexOf(Theme.currentTheme); + }; + } +} diff --git a/modules/configuration/StylingView.qml b/modules/configuration/StylingView.qml index 731ecaf..5454953 100644 --- a/modules/configuration/StylingView.qml +++ b/modules/configuration/StylingView.qml @@ -1,4 +1,5 @@ import qs.components +import qs.components.composite import qs.config import QtQuick import QtQuick.Layouts @@ -10,16 +11,9 @@ StyledPane { StyledText { text: "Theme" - // font.bold: true font.pixelSize: Styling.typography.textSize.lg } - StyledComboBox { - currentIndex: Theme.themes.indexOf(Theme.currentTheme) - model: Theme.themes - onActivated: index => { - Theme.currentTheme = Theme.themes[index]; - } - } + ThemeComboBox {} } }