Compare commits
3 commits
37afb798bc
...
c03d24de15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c03d24de15 | ||
|
|
7a04cccf0c | ||
|
|
fdf61a0e90 |
4 changed files with 23 additions and 10 deletions
20
components/composite/ThemeComboBox.qml
Normal file
20
components/composite/ThemeComboBox.qml
Normal file
|
|
@ -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);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,6 @@ import Quickshell.Io
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string fontFamily: "JetBrainsMono Nerd Font"
|
|
||||||
property var palette: theme.palette
|
property var palette: theme.palette
|
||||||
|
|
||||||
property alias themes: cache.themes
|
property alias themes: cache.themes
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import qs.components
|
import qs.components
|
||||||
|
import qs.components.composite
|
||||||
import qs.config
|
import qs.config
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
@ -10,16 +11,9 @@ StyledPane {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Theme"
|
text: "Theme"
|
||||||
// font.bold: true
|
|
||||||
font.pixelSize: Styling.typography.textSize.lg
|
font.pixelSize: Styling.typography.textSize.lg
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledComboBox {
|
ThemeComboBox {}
|
||||||
currentIndex: Theme.themes.indexOf(Theme.currentTheme)
|
|
||||||
model: Theme.themes
|
|
||||||
onActivated: index => {
|
|
||||||
Theme.currentTheme = Theme.themes[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ StyledPanelWindow {
|
||||||
id: circle
|
id: circle
|
||||||
radius: 150
|
radius: 150
|
||||||
borderColor: Styling.theme.base100
|
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
|
strokeWidth: 12
|
||||||
fillColor: button.hovered ? Styling.theme.primary : "transparent"
|
fillColor: button.hovered ? Styling.theme.primary : "transparent"
|
||||||
percentage: (PomodoroService.state == "timer" ? (PomodoroService.initialTime - PomodoroService.remainingTime) : PomodoroService.remainingTime) / PomodoroService.initialTime % 1
|
percentage: (PomodoroService.state == "timer" ? (PomodoroService.initialTime - PomodoroService.remainingTime) : PomodoroService.remainingTime) / PomodoroService.initialTime % 1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue