add blocker presets
This commit is contained in:
12 files changed
+426
-83
No files matched your search
@@ -102,6 +102,29 @@ ScrollView {
|
||||
idle: !controller.timerEnabled || !controller.running
|
||||
}
|
||||
|
||||
// Switching here takes effect at once — it resizes whatever
|
||||
// is already running or paused too, not just the next one.
|
||||
RowLayout {
|
||||
visible: controller.timerEnabled
|
||||
&& controller.settings.pomodoro
|
||||
&& controller.settings.pomodoro.presets
|
||||
&& controller.settings.pomodoro.presets.length > 0
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: 14
|
||||
spacing: 8
|
||||
|
||||
Repeater {
|
||||
model: controller.settings.pomodoro ? controller.settings.pomodoro.presets : []
|
||||
delegate: PresetChip {
|
||||
required property var modelData
|
||||
required property int index
|
||||
text: modelData.name
|
||||
active: controller.activePresetIndex === index
|
||||
onClicked: controller.applyPreset(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: controller.timerEnabled && controller.running
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Reference in new issue
Block a user