feat: Add toggle for calendar event display

This commit is contained in:
loner
2025-10-21 20:33:39 +08:00
parent 95faefa8eb
commit dea916617a
5 changed files with 24 additions and 2 deletions
+2 -1
View File
@@ -561,7 +561,7 @@ NPanel {
// Event indicator dots
Row {
visible: parent.parent.parent.parent.parent.hasEventsOnDate(model.year, model.month, model.day)
visible: Settings.data.location.showCalendarEvents && parent.parent.parent.parent.parent.hasEventsOnDate(model.year, model.month, model.day)
spacing: 2
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
@@ -587,6 +587,7 @@ NPanel {
MouseArea {
anchors.fill: parent
hoverEnabled: true
enabled: Settings.data.location.showCalendarEvents
onEntered: {
const events = parent.parent.parent.parent.parent.getEventsForDate(model.year, model.month, model.day)
+7
View File
@@ -117,6 +117,13 @@ ColumnLayout {
checked: Settings.data.location.showWeekNumberInCalendar
onToggled: checked => Settings.data.location.showWeekNumberInCalendar = checked
}
NToggle {
label: I18n.tr("settings.location.date-time.show-events.label")
description: I18n.tr("settings.location.date-time.show-events.description")
checked: Settings.data.location.showCalendarEvents
onToggled: checked => Settings.data.location.showCalendarEvents = checked
}
}
NDivider {