1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

Fix event animation

This commit is contained in:
bbedward
2025-07-14 13:54:06 -04:00
parent fff7dace3b
commit 58d711b3e9
2 changed files with 21 additions and 7 deletions

View File

@@ -76,9 +76,10 @@ PanelWindow {
contentHeight += mainRowHeight + theme.spacingM // Add spacing between main row and events
// Add events widget height - dynamically calculated
// Add events widget height - use calculated height instead of actual
if (CalendarService && CalendarService.khalAvailable) {
let eventsHeight = eventsWidget.height || 120 // Use actual widget height or fallback
let hasEvents = eventsWidget.selectedDateEvents && eventsWidget.selectedDateEvents.length > 0
let eventsHeight = hasEvents ? Math.min(300, 80 + eventsWidget.selectedDateEvents.length * 60) : 120
contentHeight += eventsHeight
}
@@ -136,6 +137,15 @@ PanelWindow {
}
}
// Update height when events widget's selectedDateEvents changes
Connections {
target: eventsWidget
enabled: eventsWidget !== null
function onSelectedDateEventsChanged() {
mainContainer.height = mainContainer.calculateHeight()
}
}
Behavior on opacity {
NumberAnimation {
duration: theme.longDuration
@@ -216,10 +226,6 @@ PanelWindow {
theme: centerCommandCenter.theme
selectedDate: calendarWidget.selectedDate
// Update container height when events widget height changes
onHeightChanged: {
mainContainer.height = mainContainer.calculateHeight()
}
}
}
}