mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Control center improvements
This commit is contained in:
@@ -34,7 +34,14 @@ PanelWindow {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
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: {
|
||||||
|
let baseHeight = Math.min(500, parent.height - Theme.barHeight - Theme.spacingS * 2)
|
||||||
|
// Expand container when power menu is open
|
||||||
|
if (controlCenterPopup.powerOptionsExpanded) {
|
||||||
|
baseHeight += 70 // Extra space for power options
|
||||||
|
}
|
||||||
|
return baseHeight
|
||||||
|
}
|
||||||
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
x: Math.max(Theme.spacingL, parent.width - width - Theme.spacingL)
|
||||||
y: Theme.barHeight + Theme.spacingXS
|
y: Theme.barHeight + Theme.spacingXS
|
||||||
color: Theme.surfaceContainer
|
color: Theme.surfaceContainer
|
||||||
@@ -59,6 +66,13 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Theme.mediumDuration
|
||||||
|
easing.type: Theme.emphasizedEasing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Theme.spacingL
|
anchors.margins: Theme.spacingL
|
||||||
|
|||||||
@@ -135,43 +135,41 @@ Item {
|
|||||||
// Ethernet status card
|
// Ethernet status card
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 100
|
height: 60
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.5)
|
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.3)
|
||||||
border.color: networkTab.networkStatus === "ethernet" ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12)
|
border.color: networkTab.networkStatus === "ethernet" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3) : "transparent"
|
||||||
border.width: networkTab.networkStatus === "ethernet" ? 2 : 1
|
border.width: networkTab.networkStatus === "ethernet" ? 1 : 0
|
||||||
|
|
||||||
Column {
|
Row {
|
||||||
anchors.centerIn: parent
|
anchors.left: parent.left
|
||||||
spacing: Theme.spacingS
|
anchors.leftMargin: Theme.spacingM
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
Row {
|
Text {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
text: "lan"
|
||||||
spacing: Theme.spacingM
|
font.family: Theme.iconFont
|
||||||
|
font.pixelSize: Theme.iconSize
|
||||||
|
color: networkTab.networkStatus === "ethernet" ? Theme.primary : Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
spacing: 2
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "lan"
|
text: "Ethernet"
|
||||||
font.family: Theme.iconFont
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
font.pixelSize: Theme.iconSizeLarge
|
|
||||||
color: networkTab.networkStatus === "ethernet" ? Theme.primary : Theme.surfaceText
|
color: networkTab.networkStatus === "ethernet" ? Theme.primary : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
font.weight: Font.Medium
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Text {
|
||||||
spacing: 2
|
text: networkTab.networkStatus === "ethernet" ? "Connected" : "Disconnected"
|
||||||
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
Text {
|
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||||
text: "Ethernet"
|
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
|
||||||
color: networkTab.networkStatus === "ethernet" ? Theme.primary : Theme.surfaceText
|
|
||||||
font.weight: Font.Medium
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: networkTab.networkStatus === "ethernet" ? "Connected" : "Disconnected"
|
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
|
||||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,17 @@ Rectangle {
|
|||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bluetooth Icon (when available and enabled) - moved next to network
|
||||||
|
Text {
|
||||||
|
text: "bluetooth"
|
||||||
|
font.family: Theme.iconFont
|
||||||
|
font.pixelSize: Theme.iconSize - 8
|
||||||
|
font.weight: Theme.iconFontWeight
|
||||||
|
color: root.bluetoothEnabled ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5)
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
visible: root.bluetoothAvailable && root.bluetoothEnabled
|
||||||
|
}
|
||||||
|
|
||||||
// Audio Icon
|
// Audio Icon
|
||||||
Text {
|
Text {
|
||||||
text: root.volumeLevel === 0 ? "volume_off" :
|
text: root.volumeLevel === 0 ? "volume_off" :
|
||||||
@@ -71,17 +82,6 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: false // TODO: Add mic detection
|
visible: false // TODO: Add mic detection
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bluetooth Icon (when available and enabled)
|
|
||||||
Text {
|
|
||||||
text: "bluetooth"
|
|
||||||
font.family: Theme.iconFont
|
|
||||||
font.pixelSize: Theme.iconSize - 8
|
|
||||||
font.weight: Theme.iconFontWeight
|
|
||||||
color: root.bluetoothEnabled ? Theme.primary : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5)
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
visible: root.bluetoothAvailable && root.bluetoothEnabled
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
Reference in New Issue
Block a user