From b0d45d8409944fdbb269b17266b25b87c7c8d223 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 18 Mar 2023 19:52:35 -0700 Subject: [PATCH] statusbar: Cleanup and fix audio indicator not showing --- .../mobileshell/qml/dataproviders/AudioInfo.qml | 2 +- .../mobileshell/qml/homescreen/HomeScreen.qml | 1 - .../mobileshell/qml/statusbar/StatusBar.qml | 17 ++++++----------- .../statusbar/indicators/BluetoothIndicator.qml | 5 +---- .../statusbar/indicators/InternetIndicator.qml | 3 --- .../statusbar/indicators/VolumeIndicator.qml | 2 -- 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/components/mobileshell/qml/dataproviders/AudioInfo.qml b/components/mobileshell/qml/dataproviders/AudioInfo.qml index 433ae769..596926a7 100644 --- a/components/mobileshell/qml/dataproviders/AudioInfo.qml +++ b/components/mobileshell/qml/dataproviders/AudioInfo.qml @@ -9,7 +9,7 @@ QtObject { property SinkModel paSinkModel: SinkModel {} // whether the audio icon should be visible in the status bar - readonly property bool isVisible: paSinkModel.preferredSink && paSinkModel.preferredSink.muted + readonly property bool isVisible: paSinkModel.preferredSink // the icon that should be displayed in the status bar readonly property string icon: paSinkModel.preferredSink && !isDummyOutput(paSinkModel.preferredSink) diff --git a/components/mobileshell/qml/homescreen/HomeScreen.qml b/components/mobileshell/qml/homescreen/HomeScreen.qml index 7aec79e1..40c461ab 100644 --- a/components/mobileshell/qml/homescreen/HomeScreen.qml +++ b/components/mobileshell/qml/homescreen/HomeScreen.qml @@ -176,7 +176,6 @@ Item { function evaluateAnimChange() { // only animate if homescreen is visible - console.log('EVAL'); if (!WindowPlugin.WindowMaximizedTracker.showingWindow || WindowPlugin.WindowUtil.activeWindowIsShell) { itemContainer.zoomIn(); } else { diff --git a/components/mobileshell/qml/statusbar/StatusBar.qml b/components/mobileshell/qml/statusbar/StatusBar.qml index cd837c4d..7ca460de 100644 --- a/components/mobileshell/qml/statusbar/StatusBar.qml +++ b/components/mobileshell/qml/statusbar/StatusBar.qml @@ -54,7 +54,6 @@ Item { property bool disableSystemTray: false property alias colorScopeColor: icons.backgroundColor - property alias applets: appletIconsRow readonly property real textPixelSize: 11 readonly property real smallerTextPixelSize: 9 @@ -162,15 +161,6 @@ Item { } } - // applet indicators - RowLayout { - id: appletIconsRow - Layout.leftMargin: root.elementSpacing - Layout.fillHeight: true - spacing: root.elementSpacing - visible: children.length > 0 - } - // system indicators RowLayout { id: indicators @@ -179,25 +169,30 @@ Item { spacing: root.elementSpacing Indicators.SignalStrengthIndicator { - Layout.fillHeight: true showLabel: false visible: root.showTime internetIndicator: internetIndicatorItem + Layout.fillHeight: true + Layout.preferredWidth: height } Indicators.BluetoothIndicator { Layout.fillHeight: true + Layout.preferredWidth: height } Indicators.InternetIndicator { id: internetIndicatorItem Layout.fillHeight: true + Layout.preferredWidth: height } Indicators.VolumeIndicator { Layout.fillHeight: true + Layout.preferredWidth: height } Indicators.BatteryIndicator { spacing: root.elementSpacing textPixelSize: root.textPixelSize Layout.fillHeight: true + Layout.preferredWidth: height } } } diff --git a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml index 8ea8ac58..90b34867 100644 --- a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml @@ -19,11 +19,8 @@ PlasmaCore.IconItem { readonly property var provider: DataProviders.BluetoothInfo {} - source: provider.icon + source: "network-bluetooth" // provider.icon colorGroup: PlasmaCore.ColorScope.colorGroup visible: provider.isVisible - - Layout.fillHeight: true - Layout.preferredWidth: height } diff --git a/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml b/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml index e7c7b924..5ec3861f 100644 --- a/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml @@ -41,9 +41,6 @@ PlasmaCore.IconItem { source: icon colorGroup: PlasmaCore.ColorScope.colorGroup - Layout.fillHeight: true - Layout.preferredWidth: height - PlasmaComponents.BusyIndicator { id: connectingIndicator diff --git a/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml b/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml index 1237b3e1..92838829 100644 --- a/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml @@ -18,8 +18,6 @@ PlasmaCore.IconItem { id: paIcon readonly property var provider: DataProviders.AudioInfo {} - Layout.fillHeight: true - Layout.preferredWidth: height source: provider.icon colorGroup: PlasmaCore.ColorScope.colorGroup