From f1d714ad9ac4d9aca708125c6cd096e39fd0c0e7 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Mon, 17 Nov 2025 14:53:47 -0500 Subject: [PATCH] Cleanup: replaced a bunch of Screen by their proper "screen" --- Modules/Bar/Extras/BarPill.qml | 4 ++++ Modules/Bar/Extras/BarPillHorizontal.qml | 4 ++-- Modules/Bar/Extras/BarPillVertical.qml | 4 +++- Modules/Bar/Widgets/ActiveWindow.qml | 2 +- Modules/Bar/Widgets/Battery.qml | 1 + Modules/Bar/Widgets/Bluetooth.qml | 1 + Modules/Bar/Widgets/Brightness.qml | 1 + Modules/Bar/Widgets/Clock.qml | 2 +- Modules/Bar/Widgets/CustomButton.qml | 1 + Modules/Bar/Widgets/KeepAwake.qml | 2 +- Modules/Bar/Widgets/KeyboardLayout.qml | 3 ++- Modules/Bar/Widgets/MediaMini.qml | 2 +- Modules/Bar/Widgets/Microphone.qml | 1 + Modules/Bar/Widgets/Taskbar.qml | 2 +- Modules/Bar/Widgets/TaskbarGrouped.qml | 2 +- Modules/Bar/Widgets/Tray.qml | 2 +- Modules/Bar/Widgets/Volume.qml | 1 + Modules/Bar/Widgets/WiFi.qml | 1 + Modules/Dock/Dock.qml | 2 +- .../Settings/Bar/WidgetSettings/CustomButtonSettings.qml | 6 +++--- Modules/Panels/Tray/TrayDrawerPanel.qml | 2 +- Widgets/NButton.qml | 2 +- Widgets/NIconButton.qml | 2 +- Widgets/NIconButtonHot.qml | 2 +- Widgets/NSlider.qml | 2 +- 25 files changed, 34 insertions(+), 20 deletions(-) diff --git a/Modules/Bar/Extras/BarPill.qml b/Modules/Bar/Extras/BarPill.qml index a50041ca..b158f834 100644 --- a/Modules/Bar/Extras/BarPill.qml +++ b/Modules/Bar/Extras/BarPill.qml @@ -7,6 +7,8 @@ import qs.Widgets Item { id: root + required property ShellScreen screen + property string icon: "" property string text: "" property string suffix: "" @@ -43,6 +45,7 @@ Item { Component { id: verticalPillComponent BarPillVertical { + screen: root.screen icon: root.icon text: root.text suffix: root.suffix @@ -68,6 +71,7 @@ Item { Component { id: horizontalPillComponent BarPillHorizontal { + screen: root.screen icon: root.icon text: root.text suffix: root.suffix diff --git a/Modules/Bar/Extras/BarPillHorizontal.qml b/Modules/Bar/Extras/BarPillHorizontal.qml index 3ab83b24..bddd8dec 100644 --- a/Modules/Bar/Extras/BarPillHorizontal.qml +++ b/Modules/Bar/Extras/BarPillHorizontal.qml @@ -8,7 +8,7 @@ import qs.Widgets Item { id: root - property ShellScreen screen + required property ShellScreen screen property string icon: "" property string text: "" @@ -255,7 +255,7 @@ Item { onEntered: { hovered = true; root.entered(); - TooltipService.show(Screen, pill, root.tooltipText, BarService.getTooltipDirection(), Style.tooltipDelayLong); + TooltipService.show(screen, pill, root.tooltipText, BarService.getTooltipDirection(), Style.tooltipDelayLong); if (forceClose) { return; } diff --git a/Modules/Bar/Extras/BarPillVertical.qml b/Modules/Bar/Extras/BarPillVertical.qml index 1bded472..d36256e2 100644 --- a/Modules/Bar/Extras/BarPillVertical.qml +++ b/Modules/Bar/Extras/BarPillVertical.qml @@ -8,6 +8,8 @@ import qs.Widgets Item { id: root + required property ShellScreen screen + property string icon: "" property string text: "" property string suffix: "" @@ -295,7 +297,7 @@ Item { onEntered: { hovered = true; root.entered(); - TooltipService.show(Screen, pill, root.tooltipText, BarService.getTooltipDirection(), Style.tooltipDelayLong); + TooltipService.show(screen, pill, root.tooltipText, BarService.getTooltipDirection(), Style.tooltipDelayLong); if (forceClose) { return; } diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index cbd95315..a8b49b00 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -412,7 +412,7 @@ Item { acceptedButtons: Qt.LeftButton onEntered: { if ((windowTitle !== "") && isVerticalBar || (scrollingMode === "never")) { - TooltipService.show(Screen, root, windowTitle, BarService.getTooltipDirection()); + TooltipService.show(screen, root, windowTitle, BarService.getTooltipDirection()); } } onExited: { diff --git a/Modules/Bar/Widgets/Battery.qml b/Modules/Bar/Widgets/Battery.qml index 4a9ff0fc..08f6fc03 100644 --- a/Modules/Bar/Widgets/Battery.qml +++ b/Modules/Bar/Widgets/Battery.qml @@ -87,6 +87,7 @@ Item { BarPill { id: pill + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: testMode ? BatteryService.getIcon(testPercent, testCharging, true) : BatteryService.getIcon(percent, charging, isReady) diff --git a/Modules/Bar/Widgets/Bluetooth.qml b/Modules/Bar/Widgets/Bluetooth.qml index cbe63515..c9c521e3 100644 --- a/Modules/Bar/Widgets/Bluetooth.qml +++ b/Modules/Bar/Widgets/Bluetooth.qml @@ -36,6 +36,7 @@ Item { BarPill { id: pill + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: BluetoothService.enabled ? "bluetooth" : "bluetooth-off" diff --git a/Modules/Bar/Widgets/Brightness.qml b/Modules/Bar/Widgets/Brightness.qml index 98107aef..1ea53747 100644 --- a/Modules/Bar/Widgets/Brightness.qml +++ b/Modules/Bar/Widgets/Brightness.qml @@ -77,6 +77,7 @@ Item { BarPill { id: pill + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: getIcon() diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index 6e9e183b..5e5205b4 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -122,7 +122,7 @@ Rectangle { hoverEnabled: true onEntered: { if (!PanelService.getPanel("calendarPanel", screen)?.active) { - TooltipService.show(Screen, root, I18n.tr("clock.tooltip"), BarService.getTooltipDirection()); + TooltipService.show(screen, root, I18n.tr("clock.tooltip"), BarService.getTooltipDirection()); } } onExited: { diff --git a/Modules/Bar/Widgets/CustomButton.qml b/Modules/Bar/Widgets/CustomButton.qml index 9cc000ba..b6628098 100644 --- a/Modules/Bar/Widgets/CustomButton.qml +++ b/Modules/Bar/Widgets/CustomButton.qml @@ -55,6 +55,7 @@ Item { BarPill { id: pill + screen: root.screen oppositeDirection: BarService.getPillDirection(root) icon: _dynamicIcon !== "" ? _dynamicIcon : customIcon text: shouldShowText ? _dynamicText : "" diff --git a/Modules/Bar/Widgets/KeepAwake.qml b/Modules/Bar/Widgets/KeepAwake.qml index 5611df2d..5933df31 100644 --- a/Modules/Bar/Widgets/KeepAwake.qml +++ b/Modules/Bar/Widgets/KeepAwake.qml @@ -37,8 +37,8 @@ Item { BarPill { id: pill + screen: root.screen text: IdleInhibitorService.timeout == null ? "" : Time.formatVagueHumanReadableDuration(IdleInhibitorService.timeout) - density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off" diff --git a/Modules/Bar/Widgets/KeyboardLayout.qml b/Modules/Bar/Widgets/KeyboardLayout.qml index 17fec633..9c7add85 100644 --- a/Modules/Bar/Widgets/KeyboardLayout.qml +++ b/Modules/Bar/Widgets/KeyboardLayout.qml @@ -41,8 +41,9 @@ Item { BarPill { id: pill - anchors.verticalCenter: parent.verticalCenter + + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: "keyboard" diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 8a5fa212..4483c3e7 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -484,7 +484,7 @@ Item { onEntered: { var textToShow = hasActivePlayer ? tooltipText : placeholderText; if ((textToShow !== "") && isVerticalBar || (scrollingMode === "never")) { - TooltipService.show(Screen, root, textToShow, BarService.getTooltipDirection()); + TooltipService.show(screen, root, textToShow, BarService.getTooltipDirection()); } } onExited: { diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 56cf2169..6014bba1 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -87,6 +87,7 @@ Item { BarPill { id: pill + screen: root.screen oppositeDirection: BarService.getPillDirection(root) icon: AudioService.getInputIcon() density: Settings.data.bar.density diff --git a/Modules/Bar/Widgets/Taskbar.qml b/Modules/Bar/Widgets/Taskbar.qml index 651a7ff3..e8e30adb 100644 --- a/Modules/Bar/Widgets/Taskbar.qml +++ b/Modules/Bar/Widgets/Taskbar.qml @@ -177,7 +177,7 @@ Rectangle { } } } - onEntered: TooltipService.show(Screen, taskbarItem, taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown app.", BarService.getTooltipDirection()) + onEntered: TooltipService.show(screen, taskbarItem, taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown app.", BarService.getTooltipDirection()) onExited: TooltipService.hide() } } diff --git a/Modules/Bar/Widgets/TaskbarGrouped.qml b/Modules/Bar/Widgets/TaskbarGrouped.qml index 01254d5e..f519df66 100644 --- a/Modules/Bar/Widgets/TaskbarGrouped.qml +++ b/Modules/Bar/Widgets/TaskbarGrouped.qml @@ -306,7 +306,7 @@ Item { } onEntered: { taskbarItem.itemHovered = true; - TooltipService.show(Screen, taskbarItem, model.title || model.appId || "Unknown app.", BarService.getTooltipDirection()); + TooltipService.show(screen, taskbarItem, model.title || model.appId || "Unknown app.", BarService.getTooltipDirection()); } onExited: { taskbarItem.itemHovered = false; diff --git a/Modules/Bar/Widgets/Tray.qml b/Modules/Bar/Widgets/Tray.qml index 0b584ac3..32779925 100644 --- a/Modules/Bar/Widgets/Tray.qml +++ b/Modules/Bar/Widgets/Tray.qml @@ -379,7 +379,7 @@ Rectangle { if (trayMenuWindow) { trayMenuWindow.close(); } - TooltipService.show(Screen, trayIcon, modelData.tooltipTitle || modelData.name || modelData.id || "Tray Item", BarService.getTooltipDirection()); + TooltipService.show(screen, trayIcon, modelData.tooltipTitle || modelData.name || modelData.id || "Tray Item", BarService.getTooltipDirection()); } onExited: TooltipService.hide() } diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index 566e6159..0a2d4f1d 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -70,6 +70,7 @@ Item { BarPill { id: pill + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: AudioService.getOutputIcon() diff --git a/Modules/Bar/Widgets/WiFi.qml b/Modules/Bar/Widgets/WiFi.qml index 11d4d663..b17de9eb 100644 --- a/Modules/Bar/Widgets/WiFi.qml +++ b/Modules/Bar/Widgets/WiFi.qml @@ -36,6 +36,7 @@ Item { BarPill { id: pill + screen: root.screen density: Settings.data.bar.density oppositeDirection: BarService.getPillDirection(root) icon: { diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index f56c6816..91686e7b 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -500,7 +500,7 @@ Loader { const appName = appButton.appTitle || appButton.appId || "Unknown"; const tooltipText = appName.length > 40 ? appName.substring(0, 37) + "..." : appName; if (!contextMenu.visible) { - TooltipService.show(Screen, appButton, tooltipText, "top"); + TooltipService.show(screen, appButton, tooltipText, "top"); } if (autoHide) { showTimer.stop(); diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml index a990638a..7f94fa46 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml @@ -82,7 +82,7 @@ ColumnLayout { enabled: !valueTextStream Layout.alignment: Qt.AlignRight | Qt.AlignBottom Layout.bottomMargin: Style.marginS - onEntered: TooltipService.show(Screen, leftClickUpdateText, I18n.tr("bar.widget-settings.custom-button.left-click.update-text"), "auto") + onEntered: TooltipService.show(screen, leftClickUpdateText, I18n.tr("bar.widget-settings.custom-button.left-click.update-text"), "auto") onExited: TooltipService.hide() checked: widgetData?.leftClickUpdateText ?? widgetMetadata.leftClickUpdateText onToggled: isChecked => checked = isChecked @@ -106,7 +106,7 @@ ColumnLayout { enabled: !valueTextStream Layout.alignment: Qt.AlignRight | Qt.AlignBottom Layout.bottomMargin: Style.marginS - onEntered: TooltipService.show(Screen, rightClickUpdateText, I18n.tr("bar.widget-settings.custom-button.right-click.update-text"), "auto") + onEntered: TooltipService.show(screen, rightClickUpdateText, I18n.tr("bar.widget-settings.custom-button.right-click.update-text"), "auto") onExited: TooltipService.hide() checked: widgetData?.rightClickUpdateText ?? widgetMetadata.rightClickUpdateText onToggled: isChecked => checked = isChecked @@ -130,7 +130,7 @@ ColumnLayout { enabled: !valueTextStream Layout.alignment: Qt.AlignRight | Qt.AlignBottom Layout.bottomMargin: Style.marginS - onEntered: TooltipService.show(Screen, middleClickUpdateText, I18n.tr("bar.widget-settings.custom-button.middle-click.update-text"), "auto") + onEntered: TooltipService.show(screen, middleClickUpdateText, I18n.tr("bar.widget-settings.custom-button.middle-click.update-text"), "auto") onExited: TooltipService.hide() checked: widgetData?.middleClickUpdateText ?? widgetMetadata.middleClickUpdateText onToggled: isChecked => checked = isChecked diff --git a/Modules/Panels/Tray/TrayDrawerPanel.qml b/Modules/Panels/Tray/TrayDrawerPanel.qml index 53d9245e..d2c49aa3 100644 --- a/Modules/Panels/Tray/TrayDrawerPanel.qml +++ b/Modules/Panels/Tray/TrayDrawerPanel.qml @@ -235,7 +235,7 @@ SmartPanel { if (trayMenuWindow) { trayMenuWindow.close(); } - TooltipService.show(Screen, trayIcon, modelData.tooltipTitle || modelData.name || modelData.id || "Tray Item", BarService.getTooltipDirection()); + TooltipService.show(screen, trayIcon, modelData.tooltipTitle || modelData.name || modelData.id || "Tray Item", BarService.getTooltipDirection()); } onExited: TooltipService.hide() } diff --git a/Widgets/NButton.qml b/Widgets/NButton.qml index 3baeed65..193baf7d 100644 --- a/Widgets/NButton.qml +++ b/Widgets/NButton.qml @@ -144,7 +144,7 @@ Rectangle { root.hovered = true; root.entered(); if (tooltipText) { - TooltipService.show(Screen, root, root.tooltipText); + TooltipService.show(screen, root, root.tooltipText); } } onExited: { diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index 7ec3d521..fc862cf8 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -83,7 +83,7 @@ Rectangle { onEntered: { hovering = root.enabled ? true : false; if (tooltipText) { - TooltipService.show(Screen, parent, tooltipText, tooltipDirection); + TooltipService.show(screen, parent, tooltipText, tooltipDirection); } root.entered(); } diff --git a/Widgets/NIconButtonHot.qml b/Widgets/NIconButtonHot.qml index d40a0329..4d916655 100644 --- a/Widgets/NIconButtonHot.qml +++ b/Widgets/NIconButtonHot.qml @@ -119,7 +119,7 @@ Rectangle { onEntered: { hovering = root.enabled ? true : false; if (tooltipText) { - TooltipService.show(Screen, parent, tooltipText, tooltipDirection); + TooltipService.show(screen, parent, tooltipText, tooltipDirection); } root.entered(); } diff --git a/Widgets/NSlider.qml b/Widgets/NSlider.qml index 2c2d7b4a..25aebf80 100644 --- a/Widgets/NSlider.qml +++ b/Widgets/NSlider.qml @@ -117,7 +117,7 @@ Slider { onEntered: { root.hovering = true; if (root.tooltipText) { - TooltipService.show(Screen, knob, root.tooltipText, root.tooltipDirection); + TooltipService.show(screen, knob, root.tooltipText, root.tooltipDirection); } }