1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Some more consistent spacing

This commit is contained in:
bbedward
2025-07-12 13:35:01 -04:00
parent 8a2b81aafb
commit f61ee93484
6 changed files with 6 additions and 68 deletions

View File

@@ -159,7 +159,7 @@ PanelWindow {
anchors {
top: parent.top
left: parent.left
topMargin: 50
topMargin: Theme.barHeight + Theme.spacingXS
leftMargin: Theme.spacingL
}

View File

@@ -149,6 +149,7 @@ Rectangle {
id: eventsList
anchors.fill: parent
anchors.margins: theme.spacingM
anchors.topMargin: theme.spacingM + 2
visible: hasEvents
clip: true
spacing: theme.spacingS

View File

@@ -42,7 +42,7 @@ Rectangle {
Column {
anchors.centerIn: parent
spacing: theme.spacingS
visible: !weather
visible: !weather || !weather.available
Text {
text: "cloud_off"

View File

@@ -35,7 +35,7 @@ PanelWindow {
width: Math.min(600, parent.width - Theme.spacingL * 2)
height: Math.min(500, parent.height - Theme.barHeight - Theme.spacingS * 2)
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
y: Theme.barHeight + Theme.spacingS
y: Theme.barHeight + Theme.spacingXS
color: Theme.surfaceContainer
radius: Theme.cornerRadiusLarge
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
@@ -80,69 +80,6 @@ PanelWindow {
anchors.verticalCenter: parent.verticalCenter
}
Item { width: parent.width - 300; height: 1 }
// Calendar status indicator
Rectangle {
width: 100
height: 24
radius: Theme.cornerRadiusSmall
color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.16)
anchors.verticalCenter: parent.verticalCenter
visible: CalendarService && CalendarService.khalAvailable
Row {
anchors.centerIn: parent
spacing: Theme.spacingXS
Text {
text: "event"
font.family: Theme.iconFont
font.pixelSize: Theme.iconSize - 6
color: Theme.primary
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: todayEventsText
property var todayEvents: []
text: todayEvents.length === 0 ? "No events today" :
todayEvents.length === 1 ? "1 event today" :
todayEvents.length + " events today"
function updateTodayEvents() {
if (CalendarService && CalendarService.khalAvailable) {
todayEvents = CalendarService.getEventsForDate(new Date())
} else {
todayEvents = []
}
}
Component.onCompleted: {
console.log("ControlCenter: Calendar status text initialized, CalendarService available:", !!CalendarService)
if (CalendarService) {
console.log("ControlCenter: khal available:", CalendarService.khalAvailable)
}
updateTodayEvents()
}
font.pixelSize: Theme.fontSizeXS
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
// Update when events change or khal becomes available
Connections {
target: CalendarService
enabled: CalendarService !== null
function onEventsByDateChanged() {
todayEventsText.updateTodayEvents()
}
function onKhalAvailableChanged() {
todayEventsText.updateTodayEvents()
}
}
}
}
}
}
// Tab buttons

View File

@@ -31,7 +31,7 @@ PanelWindow {
width: 400
height: 500
x: parent.width - width - Theme.spacingL
y: Theme.barHeight + Theme.spacingS
y: Theme.barHeight + Theme.spacingXS
color: Theme.surfaceContainer
radius: Theme.cornerRadiusLarge
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)

View File

@@ -39,7 +39,7 @@ PanelWindow {
width: Math.min(320, parent.width - Theme.spacingL * 2)
height: 320 // Fixed height to prevent cropping
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
y: Theme.barHeight + Theme.spacingS
y: Theme.barHeight + Theme.spacingXS
color: Theme.surfaceContainer
radius: Theme.cornerRadiusLarge
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)