mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 08:22:51 -05:00
feat: Implement battery widget in Control Center
This commit is contained in:
@@ -11,6 +11,7 @@ import qs.Modules.ControlCenter
|
|||||||
import qs.Modules.ControlCenter.Widgets
|
import qs.Modules.ControlCenter.Widgets
|
||||||
import qs.Modules.ControlCenter.Details
|
import qs.Modules.ControlCenter.Details
|
||||||
import qs.Modules.ControlCenter.Details 1.0 as Details
|
import qs.Modules.ControlCenter.Details 1.0 as Details
|
||||||
|
import qs.Modules.TopBar
|
||||||
import qs.Services
|
import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
|
||||||
@@ -239,6 +240,24 @@ DankPopout {
|
|||||||
anchors.rightMargin: Theme.spacingL
|
anchors.rightMargin: Theme.spacingL
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
|
Battery {
|
||||||
|
widgetHeight: 40
|
||||||
|
popupTarget: controlCenterBatteryPopout
|
||||||
|
parentScreen: root.triggerScreen
|
||||||
|
section: "right"
|
||||||
|
barHeight: 123
|
||||||
|
batteryPopupVisible: controlCenterBatteryPopout.shouldBeVisible
|
||||||
|
visible: BatteryService.batteryAvailable
|
||||||
|
|
||||||
|
onToggleBatteryPopup: {
|
||||||
|
if (controlCenterBatteryPopout.shouldBeVisible) {
|
||||||
|
controlCenterBatteryPopout.close()
|
||||||
|
} else {
|
||||||
|
controlCenterBatteryPopout.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DankActionButton {
|
DankActionButton {
|
||||||
buttonSize: 40
|
buttonSize: 40
|
||||||
iconName: "lock"
|
iconName: "lock"
|
||||||
@@ -718,6 +737,10 @@ DankPopout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BatteryPopout {
|
||||||
|
id: controlCenterBatteryPopout
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: networkDetailComponent
|
id: networkDetailComponent
|
||||||
NetworkDetail {}
|
NetworkDetail {}
|
||||||
|
|||||||
Reference in New Issue
Block a user