Centre the quick settings panel under the clock
This commit is contained in:
@@ -192,83 +192,82 @@ Item {
|
|||||||
onClicked: root.dismiss()
|
onClicked: root.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
WeatherCard {
|
||||||
|
anchors.top: controlCentre.top
|
||||||
|
anchors.right: controlCentre.left
|
||||||
|
anchors.rightMargin: Style.spaceReal(12)
|
||||||
|
available: root.weatherAvailable
|
||||||
|
glyph: root.weatherGlyph
|
||||||
|
place: root.weatherPlace
|
||||||
|
temperature: root.weatherTemperature
|
||||||
|
wind: root.weatherWind
|
||||||
|
}
|
||||||
|
|
||||||
|
Card {
|
||||||
|
id: controlCentre
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Style.spaceReal(10) + root.barInset
|
anchors.topMargin: Style.spaceReal(10) + root.barInset
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
implicitWidth: Style.spaceReal(400)
|
||||||
|
fillColor: Util.alpha(Color.background, Style.panelFillAlpha)
|
||||||
spacing: Style.spaceReal(12)
|
spacing: Style.spaceReal(12)
|
||||||
|
|
||||||
WeatherCard {
|
Header {
|
||||||
available: root.weatherAvailable
|
width: parent.width
|
||||||
glyph: root.weatherGlyph
|
clock: clockValue.value
|
||||||
place: root.weatherPlace
|
today: dateValue.value
|
||||||
temperature: root.weatherTemperature
|
onLockRequested: root.runAndDismiss("blob-system-lock")
|
||||||
wind: root.weatherWind
|
onLogoutRequested: root.runAndDismiss("blob-system-logout")
|
||||||
|
onCloseRequested: root.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
Card {
|
Calendar {
|
||||||
id: controlCentre
|
width: parent.width
|
||||||
implicitWidth: Style.spaceReal(400)
|
polling: root.opened
|
||||||
fillColor: Util.alpha(Color.background, Style.panelFillAlpha)
|
}
|
||||||
spacing: Style.spaceReal(12)
|
|
||||||
|
|
||||||
Header {
|
Tiles {
|
||||||
width: parent.width
|
bluetoothOn: bluetoothFlag.value
|
||||||
clock: clockValue.value
|
doNotDisturb: dndFlag.value
|
||||||
today: dateValue.value
|
nightLight: nightLightFlag.value
|
||||||
onLockRequested: root.runAndDismiss("blob-system-lock")
|
recording: recordingFlag.value
|
||||||
onLogoutRequested: root.runAndDismiss("blob-system-logout")
|
stayAwake: stayAwakeFlag.value
|
||||||
onCloseRequested: root.dismiss()
|
tabletFollow: tabletFlag.value
|
||||||
|
onRunRequested: function(command) { root.runAndDismiss(command) }
|
||||||
|
onPanelRequested: function(pluginId) { root.openPanel(pluginId) }
|
||||||
|
onToggleRequested: function(command) { root.toggleAndRefresh(command) }
|
||||||
|
}
|
||||||
|
|
||||||
|
SliderRow {
|
||||||
|
width: parent.width
|
||||||
|
icon: mutedFlag.value ? "" : ""
|
||||||
|
dimmed: mutedFlag.value
|
||||||
|
value: Number(volumeValue.value) || 0
|
||||||
|
onIconActivated: root.toggleAndRefresh("pamixer --toggle-mute")
|
||||||
|
onValueRequested: function(next) {
|
||||||
|
root.run("pamixer --set-volume " + next)
|
||||||
|
volumeValue.value = String(next)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Calendar {
|
SliderRow {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
polling: root.opened
|
icon: ""
|
||||||
|
value: Number(brightnessValue.value) || 0
|
||||||
|
onValueRequested: function(next) {
|
||||||
|
root.run("brightnessctl set " + next + "%")
|
||||||
|
brightnessValue.value = String(next)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Tiles {
|
MediaRow {
|
||||||
bluetoothOn: bluetoothFlag.value
|
width: parent.width
|
||||||
doNotDisturb: dndFlag.value
|
title: root.mediaParts.length > 0 ? root.mediaParts[0] : ""
|
||||||
nightLight: nightLightFlag.value
|
artist: root.mediaParts.length > 1 ? root.mediaParts[1] : ""
|
||||||
recording: recordingFlag.value
|
status: root.mediaParts.length > 2 ? root.mediaParts[2] : "Stopped"
|
||||||
stayAwake: stayAwakeFlag.value
|
onControlRequested: function(action) {
|
||||||
tabletFollow: tabletFlag.value
|
root.run("playerctl " + action)
|
||||||
onRunRequested: function(command) { root.runAndDismiss(command) }
|
stateSettleTimer.restart()
|
||||||
onPanelRequested: function(pluginId) { root.openPanel(pluginId) }
|
|
||||||
onToggleRequested: function(command) { root.toggleAndRefresh(command) }
|
|
||||||
}
|
|
||||||
|
|
||||||
SliderRow {
|
|
||||||
width: parent.width
|
|
||||||
icon: mutedFlag.value ? "" : ""
|
|
||||||
dimmed: mutedFlag.value
|
|
||||||
value: Number(volumeValue.value) || 0
|
|
||||||
onIconActivated: root.toggleAndRefresh("pamixer --toggle-mute")
|
|
||||||
onValueRequested: function(next) {
|
|
||||||
root.run("pamixer --set-volume " + next)
|
|
||||||
volumeValue.value = String(next)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SliderRow {
|
|
||||||
width: parent.width
|
|
||||||
icon: ""
|
|
||||||
value: Number(brightnessValue.value) || 0
|
|
||||||
onValueRequested: function(next) {
|
|
||||||
root.run("brightnessctl set " + next + "%")
|
|
||||||
brightnessValue.value = String(next)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MediaRow {
|
|
||||||
width: parent.width
|
|
||||||
title: root.mediaParts.length > 0 ? root.mediaParts[0] : ""
|
|
||||||
artist: root.mediaParts.length > 1 ? root.mediaParts[1] : ""
|
|
||||||
status: root.mediaParts.length > 2 ? root.mediaParts[2] : "Stopped"
|
|
||||||
onControlRequested: function(action) {
|
|
||||||
root.run("playerctl " + action)
|
|
||||||
stateSettleTimer.restart()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user