mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
Some more consistent spacing
This commit is contained in:
@@ -159,7 +159,7 @@ PanelWindow {
|
|||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
topMargin: 50
|
topMargin: Theme.barHeight + Theme.spacingXS
|
||||||
leftMargin: Theme.spacingL
|
leftMargin: Theme.spacingL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ Rectangle {
|
|||||||
id: eventsList
|
id: eventsList
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: theme.spacingM
|
anchors.margins: theme.spacingM
|
||||||
|
anchors.topMargin: theme.spacingM + 2
|
||||||
visible: hasEvents
|
visible: hasEvents
|
||||||
clip: true
|
clip: true
|
||||||
spacing: theme.spacingS
|
spacing: theme.spacingS
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Rectangle {
|
|||||||
Column {
|
Column {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: theme.spacingS
|
spacing: theme.spacingS
|
||||||
visible: !weather
|
visible: !weather || !weather.available
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "cloud_off"
|
text: "cloud_off"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ PanelWindow {
|
|||||||
width: Math.min(600, parent.width - Theme.spacingL * 2)
|
width: Math.min(600, parent.width - Theme.spacingL * 2)
|
||||||
height: Math.min(500, parent.height - Theme.barHeight - Theme.spacingS * 2)
|
height: Math.min(500, parent.height - Theme.barHeight - Theme.spacingS * 2)
|
||||||
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
||||||
y: Theme.barHeight + Theme.spacingS
|
y: Theme.barHeight + Theme.spacingXS
|
||||||
color: Theme.surfaceContainer
|
color: Theme.surfaceContainer
|
||||||
radius: Theme.cornerRadiusLarge
|
radius: Theme.cornerRadiusLarge
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
||||||
@@ -80,69 +80,6 @@ PanelWindow {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
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
|
// Tab buttons
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PanelWindow {
|
|||||||
width: 400
|
width: 400
|
||||||
height: 500
|
height: 500
|
||||||
x: parent.width - width - Theme.spacingL
|
x: parent.width - width - Theme.spacingL
|
||||||
y: Theme.barHeight + Theme.spacingS
|
y: Theme.barHeight + Theme.spacingXS
|
||||||
color: Theme.surfaceContainer
|
color: Theme.surfaceContainer
|
||||||
radius: Theme.cornerRadiusLarge
|
radius: Theme.cornerRadiusLarge
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ PanelWindow {
|
|||||||
width: Math.min(320, parent.width - Theme.spacingL * 2)
|
width: Math.min(320, parent.width - Theme.spacingL * 2)
|
||||||
height: 320 // Fixed height to prevent cropping
|
height: 320 // Fixed height to prevent cropping
|
||||||
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
||||||
y: Theme.barHeight + Theme.spacingS
|
y: Theme.barHeight + Theme.spacingXS
|
||||||
color: Theme.surfaceContainer
|
color: Theme.surfaceContainer
|
||||||
radius: Theme.cornerRadiusLarge
|
radius: Theme.cornerRadiusLarge
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
||||||
|
|||||||
Reference in New Issue
Block a user