Skip to content

Commit

Permalink
Merge pull request #639 from nuttyartist/optional-confetti
Browse files Browse the repository at this point in the history
Option to disable the confetti in Kanban
  • Loading branch information
nuttyartist authored Aug 25, 2023
2 parents bcaaf1f + c2ed1bb commit f366002
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/qml/TodoColumnDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MouseArea {
pressAndHoldInterval: 200

function checkTasksForConfetti () {
if (numberOfCompletedTasks === tasksView.model.items.count) {
if (rootContainer.enableConfetti && numberOfCompletedTasks === tasksView.model.items.count) {
rootContainer.showConfetti1 = true;
rootContainer.emitConfetti = true;
}
Expand Down
20 changes: 20 additions & 0 deletions src/qml/kanbanMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Item {
property bool alignKanbanToMiddleOfRoot: false
property bool isMultipleNotesSelected: false
property bool isProVersion: false
property bool enableConfetti: false

property real parentWindowHeight
property real parentWindowWidth
Expand Down Expand Up @@ -706,6 +707,25 @@ Item {
}
}
}

Row {
OptionItemButton {
contentWidth: settingsPopup.rowWidth
displayText: qsTr("Enable Confetti")
displayFontFamily: root.bodyFontFamily
platform: root.platform
themeData: root.themeData
checked: root.enableConfetti

onSwitched: {
root.enableConfetti = !root.enableConfetti;
}

onUnswitched: {
root.enableConfetti = !root.enableConfetti;
}
}
}
}
}

Expand Down

0 comments on commit f366002

Please sign in to comment.