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
@@ -3,10 +3,10 @@ import Quickshell
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
import "../components"
|
||||
|
||||
DankFlickable {
|
||||
DFlickable {
|
||||
id: mixer
|
||||
|
||||
readonly property var streams: Pipewire.nodes.values.filter(node => node.audio && node.isSink && node.isStream)
|
||||
@@ -138,7 +138,7 @@ DankFlickable {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
name: "music_off"
|
||||
size: Theme.iconSizeLarge
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
import "../components"
|
||||
|
||||
Item {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -28,7 +28,7 @@ Item {
|
||||
height: 34
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
name: widget.adapterEnabled ? "bluetooth" : "bluetooth_disabled"
|
||||
size: Theme.iconSize - 6
|
||||
@@ -44,7 +44,7 @@ Item {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
id: scanButton
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankToggle {
|
||||
DToggle {
|
||||
id: toggle
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -73,7 +73,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankListView {
|
||||
DListView {
|
||||
id: deviceList
|
||||
|
||||
anchors.top: header.bottom
|
||||
@@ -101,7 +101,7 @@ Item {
|
||||
border.color: isConnected ? Theme.primary : Theme.outlineLight
|
||||
border.width: isConnected ? 1 : Theme.layerOutlineWidth
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
id: deviceIcon
|
||||
|
||||
anchors.left: parent.left
|
||||
@@ -142,7 +142,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankSpinner {
|
||||
DSpinner {
|
||||
id: busyIndicator
|
||||
|
||||
anchors.right: parent.right
|
||||
@@ -175,7 +175,7 @@ Item {
|
||||
spacing: Theme.spacingS
|
||||
visible: !deviceList.visible
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
name: "bluetooth_disabled"
|
||||
size: Theme.iconSizeLarge
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -45,7 +45,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
name: button.icon
|
||||
size: Theme.iconSize - 6
|
||||
|
||||
+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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -24,7 +24,7 @@ Item {
|
||||
service.removeConsumer();
|
||||
}
|
||||
|
||||
DankFlickable {
|
||||
DFlickable {
|
||||
id: list
|
||||
|
||||
anchors.fill: parent
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
spacing: Theme.spacingS
|
||||
visible: !list.visible
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
name: widget.configured ? "playlist_add" : "home"
|
||||
size: Theme.iconSizeLarge
|
||||
|
||||
+10
-9
@@ -3,6 +3,7 @@ import Quickshell.Services.Mpris
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -32,15 +33,14 @@ Item {
|
||||
anchors.fill: parent
|
||||
visible: widget.hasPlayer
|
||||
|
||||
DankAlbumArt {
|
||||
MediaArtwork {
|
||||
id: art
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 84
|
||||
height: 84
|
||||
activePlayer: widget.activePlayer
|
||||
showAnimation: widget.isPlaying
|
||||
artUrl: TrackArtService.resolvedArtUrl || (widget.activePlayer ? widget.activePlayer.trackArtUrl : "") || ""
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -81,7 +81,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankSeekbar {
|
||||
DSeekbar {
|
||||
id: seekbar
|
||||
|
||||
anchors.left: parent.left
|
||||
@@ -90,6 +90,7 @@ Item {
|
||||
anchors.topMargin: Theme.spacingS
|
||||
height: 20
|
||||
activePlayer: widget.activePlayer
|
||||
stableLength: MprisController.activePlayerStableLength
|
||||
}
|
||||
|
||||
StyledText {
|
||||
@@ -119,7 +120,7 @@ Item {
|
||||
anchors.topMargin: Theme.spacingXS
|
||||
spacing: Theme.spacingM
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
iconName: "skip_previous"
|
||||
buttonSize: 38
|
||||
@@ -137,7 +138,7 @@ Item {
|
||||
color: Theme.primary
|
||||
opacity: (widget.hasPlayer && widget.activePlayer.canTogglePlaying) ? 1 : 0.5
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.centerIn: parent
|
||||
name: widget.isPlaying ? "pause" : "play_arrow"
|
||||
size: 26
|
||||
@@ -153,7 +154,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
DActionButton {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
iconName: "skip_next"
|
||||
buttonSize: 38
|
||||
@@ -165,7 +166,7 @@ Item {
|
||||
}
|
||||
|
||||
// Source switcher - one chip per MPRIS player that is currently around.
|
||||
DankFlickable {
|
||||
DFlickable {
|
||||
id: sourceRow
|
||||
|
||||
anchors.left: parent.left
|
||||
@@ -231,7 +232,7 @@ Item {
|
||||
spacing: Theme.spacingS
|
||||
visible: !widget.hasPlayer
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
name: "music_off"
|
||||
size: Theme.iconSizeLarge
|
||||
|
||||
@@ -3,7 +3,7 @@ import QtQuick.Controls
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -87,7 +87,7 @@ Item {
|
||||
border.width: editor.activeFocus ? 1 : Theme.layerOutlineWidth
|
||||
clip: true
|
||||
|
||||
DankFlickable {
|
||||
DFlickable {
|
||||
id: editorFlick
|
||||
|
||||
anchors.fill: parent
|
||||
@@ -162,7 +162,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
name: "open_in_new"
|
||||
size: Theme.fontSizeMedium
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -52,7 +52,7 @@ Item {
|
||||
border.color: Theme.outlineLight
|
||||
border.width: Theme.layerOutlineWidth
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
id: tileIcon
|
||||
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
@@ -36,7 +36,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
DankIcon {
|
||||
DIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
name: button.icon
|
||||
size: Theme.iconSize - 8
|
||||
@@ -65,7 +65,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankTabBar {
|
||||
DTabBar {
|
||||
id: tabs
|
||||
|
||||
anchors.top: parent.top
|
||||
@@ -145,7 +145,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DankTextField {
|
||||
DTextField {
|
||||
id: labelField
|
||||
|
||||
anchors.top: progress.bottom
|
||||
@@ -249,7 +249,7 @@ Item {
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
DankFlickable {
|
||||
DFlickable {
|
||||
id: lapList
|
||||
|
||||
anchors.top: elapsed.bottom
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import Quickshell.Services.Mpris
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
Item {
|
||||
id: widget
|
||||
|
||||
Reference in new issue
Block a user