mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13: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/add.png
|
||||
src/images/settings.png
|
||||
src/images/visible.png
|
||||
src/images/not-visible.png
|
||||
)
|
||||
|
||||
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 {
|
||||
sourceComponent: sideMenuComponent
|
||||
Layout.preferredWidth: item.width
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
Loader {
|
||||
|
@ -90,7 +89,6 @@ Window {
|
|||
|
||||
Loader {
|
||||
sourceComponent: sideMenuComponent
|
||||
Layout.preferredWidth: item.width
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
Loader {
|
||||
|
|
|
@ -43,13 +43,25 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
AppButton {
|
||||
icon.source: "qrc:/qt/qml/Mirai/src/images/add.png"
|
||||
icon.color: colorPalette.selected.palette.green
|
||||
text: "Add task"
|
||||
onClicked: {
|
||||
root.newTask()
|
||||
RowLayout {
|
||||
|
||||
AppButton {
|
||||
icon.source: "qrc:/qt/qml/Mirai/src/images/add.png"
|
||||
icon.color: colorPalette.selected.palette.green
|
||||
text: "Add task"
|
||||
onClicked: {
|
||||
root.newTask()
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
|
@ -129,12 +129,6 @@ Rectangle {
|
|||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
AppButton {
|
||||
text: `Hide completed tasks: ${backend.shouldHideCompletedTasks ? "ON" : "OFF"}`
|
||||
onClicked: {
|
||||
backend.hideCompletedTasks(!backend.shouldHideCompletedTasks)
|
||||
}
|
||||
}
|
||||
|
||||
Popup {
|
||||
parent: Overlay.overlay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue