mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Improve 'Completed tasks' button
This commit is contained in:
parent
66c4048b60
commit
da3f33849a
6 changed files with 20 additions and 14 deletions
|
@ -72,6 +72,8 @@ qt_add_qml_module(mirai
|
||||||
src/images/calendar.png
|
src/images/calendar.png
|
||||||
src/images/add.png
|
src/images/add.png
|
||||||
src/images/settings.png
|
src/images/settings.png
|
||||||
|
src/images/visible.png
|
||||||
|
src/images/not-visible.png
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(mirai PRIVATE Qt6::Quick)
|
target_link_libraries(mirai PRIVATE Qt6::Quick)
|
||||||
|
|
BIN
src/images/not-visible.png
Normal file
BIN
src/images/not-visible.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
src/images/visible.png
Normal file
BIN
src/images/visible.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -72,7 +72,6 @@ Window {
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
sourceComponent: sideMenuComponent
|
sourceComponent: sideMenuComponent
|
||||||
Layout.preferredWidth: item.width
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
|
@ -90,7 +89,6 @@ Window {
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
sourceComponent: sideMenuComponent
|
sourceComponent: sideMenuComponent
|
||||||
Layout.preferredWidth: item.width
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
|
|
|
@ -43,6 +43,8 @@ Rectangle {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
|
||||||
AppButton {
|
AppButton {
|
||||||
icon.source: "qrc:/qt/qml/Mirai/src/images/add.png"
|
icon.source: "qrc:/qt/qml/Mirai/src/images/add.png"
|
||||||
icon.color: colorPalette.selected.palette.green
|
icon.color: colorPalette.selected.palette.green
|
||||||
|
@ -52,6 +54,16 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AppButton {
|
||||||
|
icon.source: backend.shouldHideCompletedTasks ? "qrc:/qt/qml/Mirai/src/images/not-visible.png" : "qrc:/qt/qml/Mirai/src/images/visible.png"
|
||||||
|
text: `Completed tasks`
|
||||||
|
onClicked: {
|
||||||
|
backend.hideCompletedTasks(!backend.shouldHideCompletedTasks)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: listViewComponent
|
id: listViewComponent
|
||||||
ListView {
|
ListView {
|
||||||
|
|
|
@ -129,12 +129,6 @@ Rectangle {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
||||||
AppButton {
|
|
||||||
text: `Hide completed tasks: ${backend.shouldHideCompletedTasks ? "ON" : "OFF"}`
|
|
||||||
onClicked: {
|
|
||||||
backend.hideCompletedTasks(!backend.shouldHideCompletedTasks)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue