1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

update bluetooth not available visuals

This commit is contained in:
bbedward
2025-09-19 20:55:06 -04:00
parent 3376dc893d
commit 0055ddbc8d
3 changed files with 11 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ Rectangle {
property string secondaryText: ""
property bool expanded: false
property bool isActive: false
property bool showExpandArea: true
signal clicked()
signal expandClicked()
@@ -30,12 +31,12 @@ Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width - expandArea.width
width: parent.width - (root.showExpandArea ? expandArea.width : 0)
topLeftRadius: Theme.cornerRadius
bottomLeftRadius: Theme.cornerRadius
topRightRadius: 0
bottomRightRadius: 0
color: mainAreaMouse.containsMouse ?
topRightRadius: root.showExpandArea ? 0 : Theme.cornerRadius
bottomRightRadius: root.showExpandArea ? 0 : Theme.cornerRadius
color: showExpandArea && mainAreaMouse.containsMouse ?
Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) :
"transparent"
@@ -54,7 +55,7 @@ Rectangle {
DankIcon {
name: root.iconName
size: Theme.iconSize
color: root.isActive ? Theme.primary : root.iconColor
color: Theme.primary
anchors.verticalCenter: parent.verticalCenter
}
@@ -87,6 +88,7 @@ Rectangle {
MouseArea {
id: mainAreaMouse
visible: root.showExpandArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
@@ -103,6 +105,7 @@ Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: Theme.iconSize + Theme.spacingM * 2
visible: root.showExpandArea
topLeftRadius: 0
bottomLeftRadius: 0
topRightRadius: Theme.cornerRadius

View File

@@ -37,6 +37,7 @@ BasePill {
}
isActive: !!(BluetoothService.available && BluetoothService.adapter && BluetoothService.adapter.enabled)
showExpandArea: BluetoothService.available
primaryText: {
if (!BluetoothService.available) {
@@ -53,7 +54,7 @@ BasePill {
secondaryText: {
if (!BluetoothService.available) {
return "Not available"
return "No adapters"
}
if (!BluetoothService.adapter || !BluetoothService.adapter.enabled) {
return "Off"

View File

@@ -46,7 +46,7 @@ Rectangle {
DankIcon {
name: root.iconName
size: Theme.iconSize
color: root.isActive ? Theme.primary : Theme.surfaceText
color: Theme.primary
anchors.verticalCenter: parent.verticalCenter
}