feat: rename Game Bar to Quickpanel and support DMS 2.0
This commit is contained in:
27 files changed
+158
-145
No files matched your search
+11
-11
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: row
|
||||
@@ -30,7 +30,7 @@ Rectangle {
|
||||
const parsed = parseFloat(state);
|
||||
return isNaN(parsed) ? numberMin : parsed;
|
||||
}
|
||||
// DankSlider works in whole numbers, so only drive it directly when the
|
||||
// DSlider works in whole numbers, so only drive it directly when the
|
||||
// entity's own range is integral; otherwise map it onto 0-100.
|
||||
readonly property bool numberDirect: isNumber && Number.isInteger(numberMin) && Number.isInteger(numberMax) && Number.isInteger(numberStep)
|
||||
readonly property string numberUnit: attributes.unit_of_measurement || ""
|
||||
@@ -142,7 +142,7 @@ Rectangle {
|
||||
border.width: row.isOn ? 1 : Theme.layerOutlineWidth
|
||||
opacity: available ? 1 : 0.55
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
id: entityIcon
|
||||
|
||||
anchors.left: parent.left
|
||||
@@ -192,7 +192,7 @@ Rectangle {
|
||||
anchors.topMargin: 6
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isCover
|
||||
iconName: "keyboard_arrow_up"
|
||||
buttonSize: 30
|
||||
@@ -201,7 +201,7 @@ Rectangle {
|
||||
onClicked: row.service.cover(row.entityId, "open_cover")
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isCover
|
||||
iconName: "stop"
|
||||
buttonSize: 30
|
||||
@@ -210,7 +210,7 @@ Rectangle {
|
||||
onClicked: row.service.cover(row.entityId, "stop_cover")
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isCover
|
||||
iconName: "keyboard_arrow_down"
|
||||
buttonSize: 30
|
||||
@@ -219,7 +219,7 @@ Rectangle {
|
||||
onClicked: row.service.cover(row.entityId, "close_cover")
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isMediaPlayer
|
||||
iconName: row.attributes.is_volume_muted === true ? "volume_off" : "volume_up"
|
||||
buttonSize: 30
|
||||
@@ -228,7 +228,7 @@ Rectangle {
|
||||
onClicked: row.service.setMuted(row.entityId, row.attributes.is_volume_muted !== true)
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isMediaPlayer
|
||||
iconName: row.state === "playing" ? "pause" : "play_arrow"
|
||||
buttonSize: 30
|
||||
@@ -239,7 +239,7 @@ Rectangle {
|
||||
})
|
||||
}
|
||||
|
||||
DankToggle {
|
||||
DToggle {
|
||||
visible: row.isToggleable
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
checked: row.isOn
|
||||
@@ -247,7 +247,7 @@ Rectangle {
|
||||
onToggled: isChecked => row.service.toggle(row.entityId)
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
visible: row.isButton
|
||||
iconName: "play_arrow"
|
||||
buttonSize: 30
|
||||
@@ -257,7 +257,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
DankSlider {
|
||||
DSlider {
|
||||
id: slider
|
||||
|
||||
visible: row.hasSlider
|
||||
|
||||
Reference in new issue
Block a user