Horizontal media widget #16

Merged
Zacharias-Brohn merged 8 commits from horizontal-media-widget into settingsWindow 2026-02-25 21:59:57 +01:00
5 changed files with 44 additions and 64 deletions
Showing only changes of commit ed9e0d1c85 - Show all commits
+10 -9
View File
@@ -11,12 +11,11 @@ Item {
id: root
property color barColor: DynamicColors.palette.m3primary
property bool expanded: false
property color textColor: DynamicColors.palette.m3onSurface
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: expanded ? 300 : 150
implicitWidth: 150
Behavior on implicitWidth {
NumberAnimation {
@@ -49,16 +48,18 @@ Item {
}
RowLayout {
anchors {
fill: parent
leftMargin: 10
rightMargin: 15
}
id: layout
anchors.left: parent.left
anchors.leftMargin: Appearance.padding.small
anchors.right: parent.right
anchors.rightMargin: Appearance.padding.small * 2
anchors.verticalCenter: parent.verticalCenter
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
font.pixelSize: 18
font.pointSize: 14
text: Audio.muted ? "volume_off" : "volume_up"
}
@@ -91,7 +92,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.textColor
font.pixelSize: 18
font.pointSize: 14
text: Audio.sourceMuted ? "mic_off" : "mic"
}
+2 -2
View File
@@ -13,7 +13,7 @@ Item {
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: 25
implicitWidth: 30
CustomRect {
anchors.bottomMargin: 3
@@ -30,7 +30,7 @@ Item {
anchors.centerIn: parent
color: iconColor
font.family: "Material Symbols Rounded"
font.pixelSize: 20
font.pointSize: 16
text: HasNotifications.hasNotifications ? "\uf4fe" : "\ue7f4"
Behavior on color {
+7 -8
View File
@@ -14,7 +14,7 @@ Item {
clip: true
implicitHeight: 34
implicitWidth: rowLayout.implicitWidth + rowLayout.anchors.leftMargin + rowLayout.anchors.rightMargin
implicitWidth: rowLayout.implicitWidth + Appearance.padding.small * 2
Rectangle {
id: backgroundRect
@@ -37,19 +37,18 @@ Item {
RowLayout {
id: rowLayout
anchors.fill: parent
anchors.leftMargin: 5
anchors.rightMargin: 5
anchors.centerIn: parent
spacing: 6
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "memory_alt"
}
Resource {
Layout.alignment: Qt.AlignVCenter
mainColor: DynamicColors.palette.m3primary
percentage: ResourceUsage.memoryUsedPercentage
warningThreshold: 95
@@ -58,7 +57,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "memory"
}
@@ -71,7 +70,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "gamepad"
}
@@ -83,7 +82,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "developer_board"
}
+11 -33
View File
@@ -12,62 +12,40 @@ Item {
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: textMetrics.width + contentRow.spacing + 30
implicitWidth: contentRow.childrenRect.width + Appearance.spacing.smaller
Rectangle {
CustomRect {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: 22
radius: height / 2
Behavior on color {
CAnim {
}
}
}
RowLayout {
id: contentRow
spacing: 10
anchors.centerIn: parent
implicitHeight: 22
spacing: Appearance.spacing.small
anchors {
fill: parent
leftMargin: 5
rightMargin: 5
}
Text {
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
color: root.textColor
font.family: "Material Symbols Rounded"
font.pixelSize: 18
text: "\uf569"
Behavior on color {
CAnim {
}
}
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
font.pointSize: 14
text: "package_2"
}
TextMetrics {
id: textMetrics
font.pixelSize: 16
text: root.countUpdates
}
Text {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
CustomText {
color: root.textColor
font.pointSize: 12
text: textMetrics.text
Behavior on color {
CAnim {
}
}
}
}
}
+14 -12
View File
@@ -1,21 +1,23 @@
# Ideas/Features
- [x] Media showing; what song/media is playing?
- [x] Brightness control for Laptops.
- [x] Battery icon for Laptops. Broken?
- [ ] Change volume for `$BROWSER` environment variable? Most general media source apart from separate music/video players.
- [ ] Quick toggle for BT, WiFi (modules in the tray do this too)
- [x] Auto hide unless on mouse hover. Also implement bar changes to mute/volume to show notif or show bar for a couple seconds.
- [x] Maybe already possible; have keybinds to show certain menus. I do not want to touch my mouse to see notifications for example. Not everything in the bar needs this, but some would be good to have.
- [x] Pressing ESC or some obvious button to close nc.
- [x] Another branch for development, hold off big changes so that a working bar or if there are big config changes.
- [ ] Notification audio cue integration (with config option to disable).
- [x] Notification timeout per service. Example: If Discord pushes two notifications, the following notifications are muted for 10 minutes from Discord only. Perhaps a global mute is easier initially.
# Stupid idea's from Daivin
- [ ] An on screen pencil to draw on your screen :).
- [ ] Audio module + cava / audio wave ;) ( Don't make it into minecraft blocks
but aan actual wave) -- Probably not planned
- [ ] Update module: When there is 1 package it still looks extremely off
- [ ] Bluetooth device battery view -- Also not planned (I don't have bluetooth)
- [ ] Bluetooth device battery view -- Not planned ( Don't have a bluetooth
receiver )
# Completed features
- [x] Auto hide unless on mouse hover. Also implement bar changes to mute/volume to show notif or show bar for a couple seconds.
- [x] Maybe already possible; have keybinds to show certain menus. I do not want to touch my mouse to see notifications for example. Not everything in the bar needs this, but some would be good to have.
- [x] Pressing ESC or some obvious button to close nc.
- [x] Another branch for development, hold off big changes so that a working bar or if there are big config changes.
- [x] Media showing; what song/media is playing?
- [x] Brightness control for Laptops.
- [x] Battery icon for Laptops. Broken?
- [x] Quick toggle for BT, WiFi (modules in the tray do this too)
- [x] Update module: When there is 1 package it still looks extremely off