statusbar: Remove system tray

The system tray has not been useful on mobile and isn't particularly
interactable due to its small size. Remove the system tray from the
status bar, if we need its functionality it would be more appropriate to
create a larger "tray UI" in the quicksettings area
This commit is contained in:
Devin Lin 2026-02-06 19:16:39 -05:00
parent 1faf1872d6
commit 1914e9be44
6 changed files with 0 additions and 78 deletions

View file

@ -102,7 +102,6 @@ ecm_target_qml_sources(mobileshellplugin SOURCES
qml/statusbar/indicators/VolumeIndicator.qml qml/statusbar/indicators/VolumeIndicator.qml
qml/statusbar/ClockText.qml qml/statusbar/ClockText.qml
qml/statusbar/StatusBar.qml qml/statusbar/StatusBar.qml
qml/statusbar/TaskWidget.qml
qml/widgets/krunner/KRunnerScreen.qml qml/widgets/krunner/KRunnerScreen.qml
qml/widgets/mediacontrols/BlurredBackground.qml qml/widgets/mediacontrols/BlurredBackground.qml

View file

@ -269,9 +269,6 @@ Item {
showDropShadow: false showDropShadow: false
showTime: root.actionDrawer.mode == MobileShell.ActionDrawer.Portrait showTime: root.actionDrawer.mode == MobileShell.ActionDrawer.Portrait
// security reasons, system tray also doesn't work on lockscreen
disableSystemTray: root.actionDrawer.restrictedPermissions
opacity: brightnessPressedValue opacity: brightnessPressedValue
} }

View file

@ -46,11 +46,6 @@ Item {
*/ */
property bool showTime: true property bool showTime: true
/**
* Disables showing system tray indicators, preventing SIGABRT when used on the lockscreen.
*/
property bool disableSystemTray: false
readonly property real textPixelSize: Math.round(11 * ShellSettings.Settings.statusBarScaleFactor) readonly property real textPixelSize: Math.round(11 * ShellSettings.Settings.statusBarScaleFactor)
readonly property real smallerTextPixelSize: Math.round(9 * ShellSettings.Settings.statusBarScaleFactor) readonly property real smallerTextPixelSize: Math.round(9 * ShellSettings.Settings.statusBarScaleFactor)
readonly property real elementSpacing: Math.round(Kirigami.Units.smallSpacing * 1.5) readonly property real elementSpacing: Math.round(Kirigami.Units.smallSpacing * 1.5)
@ -59,14 +54,6 @@ Item {
id: clockSource id: clockSource
} }
property alias statusNotifierSource: statusNotifierSourceLoader.item
Loader {
id: statusNotifierSourceLoader
active: !disableSystemTray
sourceComponent: SystemTray.StatusNotifierModel { }
}
MobileShellState.PanelSettingsDBusClient { MobileShellState.PanelSettingsDBusClient {
id: panelSettings id: panelSettings
screenName: Screen.name screenName: Screen.name
@ -131,16 +118,6 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
// system tray
Repeater {
id: statusNotifierRepeater
model: root.statusNotifierSource
delegate: TaskWidget {
Layout.leftMargin: root.elementSpacing
}
}
// system indicators // system indicators
// using Layout.fillHeight here seems to cause polish loops, instead just define the height of the row // using Layout.fillHeight here seems to cause polish loops, instead just define the height of the row
RowLayout { RowLayout {

View file

@ -1,49 +0,0 @@
/*
* SPDX-FileCopyrightText: 2011 Marco Martin <mart@kde.org>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick
import org.kde.kirigami as Kirigami
Item {
id: taskIcon
width: parent.height
height: width
//hide application status icons
opacity: (Category != "ApplicationStatus" && Status != "Passive") ? 1 : 0
onOpacityChanged: visible = opacity
Behavior on opacity {
NumberAnimation {
duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad
}
}
Kirigami.Icon {
id: icon
source: IconName ? IconName : Icon
width: Math.min(parent.width, parent.height)
height: width
anchors.centerIn: parent
}
MouseArea {
anchors.fill: taskIcon
onClicked: {
//print(iconSvg.hasElement(IconName))
var service = statusNotifierSource.serviceForSource(DataEngineSource)
var operation = service.operationDescription("Activate")
operation.x = parent.x
// kmix shows main window instead of volume popup if (parent.x, parent.y) == (0, 0), which is the case here.
// I am passing a position right below the panel (assuming panel is at screen's top).
// Plasmoids' popups are already shown below the panel, so this make kmix's popup more consistent
// to them.
operation.y = parent.y + parent.height + 6
service.startOperationCall(operation)
}
}
}

View file

@ -50,7 +50,6 @@ ApplicationWindow {
showSecondRow: false showSecondRow: false
showDropShadow: true showDropShadow: true
showTime: true showTime: true
disableSystemTray: true // prevent SIGABRT, since loading the system tray leads to bad... things
} }
MobileShell.ActionDrawerOpenSurface { MobileShell.ActionDrawerOpenSurface {

View file

@ -87,7 +87,6 @@ ApplicationWindow {
showSecondRow: false showSecondRow: false
showDropShadow: true showDropShadow: true
showTime: true showTime: true
disableSystemTray: true // prevent SIGABRT, since loading the system tray leads to bad... things
} }
MobileShell.ActionDrawerOpenSurface { MobileShell.ActionDrawerOpenSurface {