mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
Fix event animation
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,8 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: theme.spacingL
|
||||
anchors.topMargin: theme.spacingM
|
||||
visible: hasEvents
|
||||
visible: opacity > 0
|
||||
opacity: hasEvents ? 1.0 : 0.0
|
||||
clip: true
|
||||
spacing: theme.spacingS
|
||||
boundsMovement: Flickable.StopAtBounds
|
||||
@@ -146,6 +147,13 @@ Rectangle {
|
||||
policy: eventsList.contentHeight > eventsList.height ? ScrollBar.AsNeeded : ScrollBar.AlwaysOff
|
||||
}
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: theme.mediumDuration
|
||||
easing.type: theme.emphasizedEasing
|
||||
}
|
||||
}
|
||||
|
||||
delegate: Rectangle {
|
||||
width: eventsList.width
|
||||
height: eventContent.implicitHeight + theme.spacingM
|
||||
|
||||
Reference in New Issue
Block a user