@@ -318,37 +318,62 @@ PanelWindow {
318318 tooltip: " Camera in use"
319319 }
320320
321- // Microphone
322- BarButton {
323- icon: Services .Audio .micMuted
324- ? Common .Icons .icons .micOff
325- : Common .Icons .icons .mic
326- tooltip: {
327- if (Services .Audio .micMuted && Services .Privacy .micInUse ) {
328- return " Microphone: Muted (in use)"
329- } else if (Services .Audio .micMuted ) {
330- return " Microphone: Muted"
331- } else if (Services .Privacy .micInUse ) {
332- return " Microphone: In use"
333- } else {
334- return " Microphone: " + Math .round (Services .Audio .micVolume * 100 ) + " %"
321+ // Audio (mic + output combined)
322+ MouseArea {
323+ id: audioButton
324+ Layout .preferredHeight : 28
325+ Layout .preferredWidth : 56 // Two 28px icons
326+ hoverEnabled: true
327+ cursorShape: Qt .PointingHandCursor
328+ onClicked: Root .GlobalStates .toggleSidebarRight (root .targetScreen , " audio" )
329+
330+ Rectangle {
331+ anchors .fill : parent
332+ radius: Common .Appearance .rounding .small
333+ color: audioButton .containsMouse
334+ ? Common .Appearance .m3colors .surfaceVariant
335+ : " transparent"
336+
337+ Behavior on color {
338+ ColorAnimation { duration: 150 }
335339 }
336340 }
337- textColor: Services .Privacy .micInUse
338- ? Common .Appearance .m3colors .error
339- : Common .Appearance .m3colors .onSurfaceVariant
340- onClicked: Root .GlobalStates .toggleSidebarRight (root .targetScreen , " audio" )
341- }
342341
343- // Audio output
344- BarButton {
345- icon: Services .Audio .muted
346- ? Common .Icons .icons .volumeOff
347- : Common .Icons .volumeIcon (Services .Audio .volume * 100 , false )
348- tooltip: Services .Audio .muted
349- ? " Volume: Muted"
350- : " Volume: " + Math .round (Services .Audio .volume * 100 ) + " %"
351- onClicked: Root .GlobalStates .toggleSidebarRight (root .targetScreen , " audio" )
342+ RowLayout {
343+ id: audioButtonContent
344+ anchors .fill : parent
345+ spacing: 0
346+
347+ Item {
348+ Layout .preferredWidth : 28
349+ Layout .preferredHeight : 28
350+
351+ Common .Icon {
352+ anchors .centerIn : parent
353+ name: Services .Audio .micMuted
354+ ? Common .Icons .icons .micOff
355+ : Common .Icons .icons .mic
356+ size: Common .Appearance .sizes .iconMedium
357+ color: Services .Privacy .micInUse
358+ ? Common .Appearance .m3colors .error
359+ : Common .Appearance .m3colors .onSurfaceVariant
360+ }
361+ }
362+
363+ Item {
364+ Layout .preferredWidth : 28
365+ Layout .preferredHeight : 28
366+
367+ Common .Icon {
368+ anchors .centerIn : parent
369+ name: Services .Audio .muted
370+ ? Common .Icons .icons .volumeOff
371+ : Common .Icons .volumeIcon (Services .Audio .volume * 100 , false )
372+ size: Common .Appearance .sizes .iconMedium
373+ color: Common .Appearance .m3colors .onSurfaceVariant
374+ }
375+ }
376+ }
352377 }
353378
354379 // Bluetooth
@@ -408,6 +433,7 @@ PanelWindow {
408433 BarButton {
409434 id: clockButton
410435 icon: Common .Icons .icons .calendar
436+ buttonText: Services .DateTime .shortDateString + " " + Services .DateTime .timeString
411437 tooltip: Services .DateTime .fullDateTimeString
412438
413439 onClicked: Root .GlobalStates .toggleSidebarRight (root .targetScreen , " calendar" )
0 commit comments