add material you style for battery
This commit is contained in:
parent
7b85ec95a4
commit
84d9c18982
@ -1,16 +1,23 @@
|
|||||||
import Quickshell
|
|
||||||
import Quickshell.Services.UPower
|
import Quickshell.Services.UPower
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Widgets
|
|
||||||
import "../../reusables/"
|
import "../../reusables/"
|
||||||
import "../../"
|
|
||||||
import "../../settings/"
|
import "../../settings/"
|
||||||
|
import "../../"
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: batLoader
|
id: batLoader
|
||||||
active: UPower.displayDevice.isLaptopBattery
|
active: UPower.displayDevice.isLaptopBattery
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Rectangle {
|
||||||
|
id: container
|
||||||
|
radius: implicitHeight / 2
|
||||||
|
color: Colors.color0
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
implicitWidth: root.implicitWidth + 20
|
||||||
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
|
Item {
|
||||||
|
anchors.centerIn: parent
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool frame1: UPower.displayDevice.percentage <= 0.16
|
property bool frame1: UPower.displayDevice.percentage <= 0.16
|
||||||
@ -61,4 +68,5 @@ Loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,12 +14,12 @@ Rectangle {
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
readonly property var activeWindow: ToplevelManager.activeToplevel
|
readonly property var activeWindow: ToplevelManager.activeToplevel
|
||||||
implicitWidth:titleText.implicitWidth + 20
|
implicitWidth: titleText.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight
|
implicitHeight: Settings.config.barHeight
|
||||||
CustomText {
|
CustomText {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
id: titleText
|
id: titleText
|
||||||
text: root.activeWindow.activated ? root.activeWindow.appId : "Desktop"
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
text: root.activeWindow ? root.activeWindow.activated ? root.activeWindow.appId : "Desktop" : "fail"
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user