From 429cb50ff7aaecb445b48f59d6327357a52abf86 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 20 Sep 2025 11:55:38 +0200 Subject: [PATCH] tooltips: use builtin text prop, fix crash (#1956) --- .../quickshell/ii/modules/bar/ScrollHint.qml | 2 +- .../quickshell/ii/modules/bar/SysTrayItem.qml | 6 +- .../ii/modules/common/widgets/AddressBar.qml | 2 +- .../common/widgets/ContentSubsection.qml | 2 +- .../modules/common/widgets/MaterialSymbol.qml | 2 +- .../common/widgets/NotificationGroup.qml | 2 +- .../common/widgets/NotificationItem.qml | 2 +- .../modules/common/widgets/StyledSlider.qml | 2 +- .../modules/common/widgets/StyledToolTip.qml | 57 ++++--------------- .../common/widgets/StyledToolTipContent.qml | 48 ++++++++++++++++ .../ii/modules/overview/OverviewWidget.qml | 2 +- .../ii/modules/overview/SearchItem.qml | 2 +- .../sessionScreen/SessionActionButton.qml | 2 +- .../ii/modules/settings/AdvancedConfig.qml | 6 +- .../ii/modules/settings/GeneralConfig.qml | 4 +- .../ii/modules/settings/InterfaceConfig.qml | 10 ++-- .../ii/modules/settings/QuickConfig.qml | 6 +- .../ii/modules/settings/ServicesConfig.qml | 2 +- .../ii/modules/sidebarLeft/AiChat.qml | 2 +- .../sidebarLeft/ApiInputBoxIndicator.qml | 2 +- .../modules/sidebarLeft/aiChat/AiMessage.qml | 10 ++-- .../sidebarLeft/aiChat/MessageCodeBlock.qml | 4 +- .../modules/sidebarLeft/anime/BooruImage.qml | 2 +- .../sidebarRight/SidebarRightContent.qml | 6 +- .../calendar/CalendarHeaderButton.qml | 2 +- .../quickToggles/BluetoothToggle.qml | 2 +- .../quickToggles/CloudflareWarp.qml | 2 +- .../quickToggles/EasyEffectsToggle.qml | 2 +- .../sidebarRight/quickToggles/GameMode.qml | 2 +- .../quickToggles/IdleInhibitor.qml | 2 +- .../quickToggles/NetworkToggle.qml | 2 +- .../sidebarRight/quickToggles/NightLight.qml | 2 +- .../todo/TodoItemActionButton.qml | 2 +- .../WallpaperSelectorContent.qml | 8 +-- .config/quickshell/ii/settings.qml | 2 +- .config/quickshell/ii/welcome.qml | 6 +- 36 files changed, 116 insertions(+), 103 deletions(-) create mode 100644 .config/quickshell/ii/modules/common/widgets/StyledToolTipContent.qml diff --git a/.config/quickshell/ii/modules/bar/ScrollHint.qml b/.config/quickshell/ii/modules/bar/ScrollHint.qml index a8e1c8dfe..9a338df48 100644 --- a/.config/quickshell/ii/modules/bar/ScrollHint.qml +++ b/.config/quickshell/ii/modules/bar/ScrollHint.qml @@ -24,7 +24,7 @@ Revealer { // Scroll hint // StyledToolTip { // extraVisibleCondition: tooltipText.length > 0 - // content: tooltipText + // text: tooltipText // } ColumnLayout { diff --git a/.config/quickshell/ii/modules/bar/SysTrayItem.qml b/.config/quickshell/ii/modules/bar/SysTrayItem.qml index 0307ad903..41389e85d 100644 --- a/.config/quickshell/ii/modules/bar/SysTrayItem.qml +++ b/.config/quickshell/ii/modules/bar/SysTrayItem.qml @@ -31,10 +31,10 @@ MouseArea { event.accepted = true; } onEntered: { - tooltip.content = item.tooltipTitle.length > 0 ? item.tooltipTitle + tooltip.text = item.tooltipTitle.length > 0 ? item.tooltipTitle : (item.title.length > 0 ? item.title : item.id); - if (item.tooltipDescription.length > 0) tooltip.content += " • " + item.tooltipDescription; - if (Config.options.bar.tray.showItemId) tooltip.content += "\n[" + item.id + "]"; + if (item.tooltipDescription.length > 0) tooltip.text += " • " + item.tooltipDescription; + if (Config.options.bar.tray.showItemId) tooltip.text += "\n[" + item.id + "]"; } Loader { diff --git a/.config/quickshell/ii/modules/common/widgets/AddressBar.qml b/.config/quickshell/ii/modules/common/widgets/AddressBar.qml index c965a536d..bf1cf2305 100644 --- a/.config/quickshell/ii/modules/common/widgets/AddressBar.qml +++ b/.config/quickshell/ii/modules/common/widgets/AddressBar.qml @@ -113,7 +113,7 @@ Rectangle { } StyledToolTip { - content: Translation.tr("Edit directory") + text: Translation.tr("Edit directory") } } } diff --git a/.config/quickshell/ii/modules/common/widgets/ContentSubsection.qml b/.config/quickshell/ii/modules/common/widgets/ContentSubsection.qml index b78f3aa81..6c3824e08 100644 --- a/.config/quickshell/ii/modules/common/widgets/ContentSubsection.qml +++ b/.config/quickshell/ii/modules/common/widgets/ContentSubsection.qml @@ -32,7 +32,7 @@ ColumnLayout { StyledToolTip { extraVisibleCondition: false alternativeVisibleCondition: infoMouseArea.containsMouse - content: root.tooltip + text: root.tooltip } } } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml b/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml index 44fabf136..75ff77d9b 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml @@ -6,7 +6,7 @@ StyledText { property real iconSize: Appearance?.font.pixelSize.small ?? 16 property real fill: 0 property real truncatedFill: Math.round(fill * 100) / 100 // Reduce memory consumption spikes from constant font remapping - renderType: Text.CurveRendering + renderType: fill !== 0 ? Text.CurveRendering : Text.NativeRendering font { hintingPreference: Font.PreferFullHinting family: Appearance?.font.family.iconMaterial ?? "Material Symbols Rounded" diff --git a/.config/quickshell/ii/modules/common/widgets/NotificationGroup.qml b/.config/quickshell/ii/modules/common/widgets/NotificationGroup.qml index d4aa00234..e0736bb10 100644 --- a/.config/quickshell/ii/modules/common/widgets/NotificationGroup.qml +++ b/.config/quickshell/ii/modules/common/widgets/NotificationGroup.qml @@ -215,7 +215,7 @@ MouseArea { // Notification group area altAction: () => { root.toggleExpanded() } StyledToolTip { - content: Translation.tr("Tip: right-clicking a group\nalso expands it") + text: Translation.tr("Tip: right-clicking a group\nalso expands it") } } } diff --git a/.config/quickshell/ii/modules/common/widgets/NotificationItem.qml b/.config/quickshell/ii/modules/common/widgets/NotificationItem.qml index 82367db17..94a7c71bf 100644 --- a/.config/quickshell/ii/modules/common/widgets/NotificationItem.qml +++ b/.config/quickshell/ii/modules/common/widgets/NotificationItem.qml @@ -209,7 +209,7 @@ Item { // Notification item area textFormat: Text.RichText text: { return `` + - `${processNotificationBody(notificationObject.body, notificationObject.appName || notificationObject.summary).replace(/\n/g, "
")}` + `${processNotificationBody(notificationObject.body, notificationObject.appName || notificationObject.summary).replace(/\n/g, "
")}` } onLinkActivated: (link) => { diff --git a/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml b/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml index e940f1a41..6f2fc2314 100644 --- a/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml +++ b/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml @@ -149,7 +149,7 @@ Slider { StyledToolTip { extraVisibleCondition: root.pressed - content: root.tooltipContent + text: root.tooltipContent } } } \ No newline at end of file diff --git a/.config/quickshell/ii/modules/common/widgets/StyledToolTip.qml b/.config/quickshell/ii/modules/common/widgets/StyledToolTip.qml index 813c9ed14..f0e40db40 100644 --- a/.config/quickshell/ii/modules/common/widgets/StyledToolTip.qml +++ b/.config/quickshell/ii/modules/common/widgets/StyledToolTip.qml @@ -6,55 +6,20 @@ import QtQuick.Layouts ToolTip { id: root - property string content property bool extraVisibleCondition: true property bool alternativeVisibleCondition: false - property bool internalVisibleCondition: { - const ans = (extraVisibleCondition && (parent.hovered === undefined || parent?.hovered)) || alternativeVisibleCondition - return ans - } + readonly property bool internalVisibleCondition: (extraVisibleCondition && (parent.hovered === undefined || parent?.hovered)) || alternativeVisibleCondition verticalPadding: 5 - horizontalPadding: 10 - opacity: internalVisibleCondition ? 1 : 0 - visible: opacity > 0 - - Behavior on opacity { - animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) - } - + horizontalPadding: 10 background: null + + visible: internalVisibleCondition - contentItem: Item { - id: contentItemBackground - implicitWidth: tooltipTextObject.width + 2 * root.horizontalPadding - implicitHeight: tooltipTextObject.height + 2 * root.verticalPadding - - Rectangle { - id: backgroundRectangle - anchors.bottom: contentItemBackground.bottom - anchors.horizontalCenter: contentItemBackground.horizontalCenter - color: Appearance?.colors.colTooltip ?? "#3C4043" - radius: Appearance?.rounding.verysmall ?? 7 - width: internalVisibleCondition ? (tooltipTextObject.width + 2 * padding) : 0 - height: internalVisibleCondition ? (tooltipTextObject.height + 2 * padding) : 0 - clip: true - - Behavior on width { - animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) - } - Behavior on height { - animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) - } - - StyledText { - id: tooltipTextObject - anchors.centerIn: parent - text: content - font.pixelSize: Appearance?.font.pixelSize.smaller ?? 14 - font.hintingPreference: Font.PreferNoHinting // Prevent shaky text - color: Appearance?.colors.colOnTooltip ?? "#FFFFFF" - wrapMode: Text.Wrap - } - } + contentItem: StyledToolTipContent { + id: contentItem + text: root.text + shown: root.internalVisibleCondition + horizontalPadding: root.horizontalPadding + verticalPadding: root.verticalPadding } -} \ No newline at end of file +} diff --git a/.config/quickshell/ii/modules/common/widgets/StyledToolTipContent.qml b/.config/quickshell/ii/modules/common/widgets/StyledToolTipContent.qml new file mode 100644 index 000000000..2d35cc6e6 --- /dev/null +++ b/.config/quickshell/ii/modules/common/widgets/StyledToolTipContent.qml @@ -0,0 +1,48 @@ +import qs.modules.common +import qs.modules.common.widgets +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Item { + id: root + required property string text + property bool shown: true + property real horizontalPadding: 10 + property real verticalPadding: 5 + implicitWidth: tooltipTextObject.implicitWidth + 2 * root.horizontalPadding + implicitHeight: tooltipTextObject.implicitHeight + 2 * root.verticalPadding + + Rectangle { + id: backgroundRectangle + anchors.bottom: root.bottom + anchors.horizontalCenter: root.horizontalCenter + color: Appearance?.colors.colTooltip ?? "#3C4043" + radius: Appearance?.rounding.verysmall ?? 7 + opacity: shown ? 1 : 0 + implicitWidth: shown ? (tooltipTextObject.implicitWidth + 2 * padding) : 0 + implicitHeight: shown ? (tooltipTextObject.implicitHeight + 2 * padding) : 0 + clip: true + + Behavior on implicitWidth { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on opacity { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + + StyledText { + id: tooltipTextObject + anchors.centerIn: parent + text: root.text + font.pixelSize: Appearance?.font.pixelSize.smaller ?? 14 + font.hintingPreference: Font.PreferNoHinting // Prevent shaky text + color: Appearance?.colors.colOnTooltip ?? "#FFFFFF" + wrapMode: Text.Wrap + } + } +} + diff --git a/.config/quickshell/ii/modules/overview/OverviewWidget.qml b/.config/quickshell/ii/modules/overview/OverviewWidget.qml index 2510a5642..13ec6370e 100644 --- a/.config/quickshell/ii/modules/overview/OverviewWidget.qml +++ b/.config/quickshell/ii/modules/overview/OverviewWidget.qml @@ -235,7 +235,7 @@ Item { StyledToolTip { extraVisibleCondition: false alternativeVisibleCondition: dragArea.containsMouse && !window.Drag.active - content: `${windowData.title}\n[${windowData.class}] ${windowData.xwayland ? "[XWayland] " : ""}\n` + text: `${windowData.title}\n[${windowData.class}] ${windowData.xwayland ? "[XWayland] " : ""}\n` } } } diff --git a/.config/quickshell/ii/modules/overview/SearchItem.qml b/.config/quickshell/ii/modules/overview/SearchItem.qml index 2e0afbfe8..f4fd20467 100644 --- a/.config/quickshell/ii/modules/overview/SearchItem.qml +++ b/.config/quickshell/ii/modules/overview/SearchItem.qml @@ -266,7 +266,7 @@ RippleButton { onClicked: modelData.execute() StyledToolTip { - content: modelData.name + text: modelData.name } } } diff --git a/.config/quickshell/ii/modules/sessionScreen/SessionActionButton.qml b/.config/quickshell/ii/modules/sessionScreen/SessionActionButton.qml index 199f2abed..000c4e201 100644 --- a/.config/quickshell/ii/modules/sessionScreen/SessionActionButton.qml +++ b/.config/quickshell/ii/modules/sessionScreen/SessionActionButton.qml @@ -52,7 +52,7 @@ RippleButton { } StyledToolTip { - content: buttonText + text: buttonText } } diff --git a/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 9a8aa2a3b..1a400cddf 100644 --- a/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -27,7 +27,7 @@ ContentPage { Config.options.appearance.wallpaperTheming.enableQtApps = checked; } StyledToolTip { - content: Translation.tr("Shell & utilities theming must also be enabled") + text: Translation.tr("Shell & utilities theming must also be enabled") } } ConfigSwitch { @@ -38,7 +38,7 @@ ContentPage { Config.options.appearance.wallpaperTheming.enableTerminal = checked; } StyledToolTip { - content: Translation.tr("Shell & utilities theming must also be enabled") + text: Translation.tr("Shell & utilities theming must also be enabled") } } ConfigRow { @@ -51,7 +51,7 @@ ContentPage { Config.options.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode= checked; } StyledToolTip { - content: Translation.tr("Ignored if terminal theming is not enabled") + text: Translation.tr("Ignored if terminal theming is not enabled") } } } diff --git a/.config/quickshell/ii/modules/settings/GeneralConfig.qml b/.config/quickshell/ii/modules/settings/GeneralConfig.qml index e520dab0b..5ba068f10 100644 --- a/.config/quickshell/ii/modules/settings/GeneralConfig.qml +++ b/.config/quickshell/ii/modules/settings/GeneralConfig.qml @@ -21,7 +21,7 @@ ContentPage { Config.options.audio.protection.enable = checked; } StyledToolTip { - content: Translation.tr("Prevents abrupt increments and restricts volume limit") + text: Translation.tr("Prevents abrupt increments and restricts volume limit") } } ConfigRow { @@ -85,7 +85,7 @@ ContentPage { Config.options.battery.automaticSuspend = checked; } StyledToolTip { - content: Translation.tr("Automatically suspends the system when battery is low") + text: Translation.tr("Automatically suspends the system when battery is low") } } ConfigSpinBox { diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 7df973622..2c14dc49f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -168,7 +168,7 @@ ContentPage { Config.options.sidebar.keepRightSidebarLoaded = checked; } StyledToolTip { - content: Translation.tr("When enabled keeps the content of the right sidebar loaded to reduce the delay when opening,\nat the cost of around 15MB of consistent RAM usage. Delay significance depends on your system's performance.\nUsing a custom kernel like linux-cachyos might help") + text: Translation.tr("When enabled keeps the content of the right sidebar loaded to reduce the delay when opening,\nat the cost of around 15MB of consistent RAM usage. Delay significance depends on your system's performance.\nUsing a custom kernel like linux-cachyos might help") } } @@ -192,7 +192,7 @@ ContentPage { } StyledToolTip { - content: Translation.tr("When this is off you'll have to click") + text: Translation.tr("When this is off you'll have to click") } } } @@ -206,7 +206,7 @@ ContentPage { } StyledToolTip { - content: Translation.tr("Place the corners to trigger at the bottom") + text: Translation.tr("Place the corners to trigger at the bottom") } } ConfigSwitch { @@ -217,7 +217,7 @@ ContentPage { } StyledToolTip { - content: Translation.tr("Brightness and volume") + text: Translation.tr("Brightness and volume") } } } @@ -326,7 +326,7 @@ ContentPage { Config.options.screenshotTool.showContentRegions = checked; } StyledToolTip { - content: Translation.tr("Such regions could be images or parts of the screen that have some containment.\nMight not always be accurate.\nThis is done with an image processing algorithm run locally and no AI is used.") + text: Translation.tr("Such regions could be images or parts of the screen that have some containment.\nMight not always be accurate.\nThis is done with an image processing algorithm run locally and no AI is used.") } } } diff --git a/.config/quickshell/ii/modules/settings/QuickConfig.qml b/.config/quickshell/ii/modules/settings/QuickConfig.qml index d9a0a09cb..5b2de5112 100644 --- a/.config/quickshell/ii/modules/settings/QuickConfig.qml +++ b/.config/quickshell/ii/modules/settings/QuickConfig.qml @@ -99,14 +99,14 @@ ContentPage { konachanWallProc.running = true; } StyledToolTip { - content: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers") + text: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers") } } RippleButtonWithIcon { Layout.fillWidth: true materialIcon: "wallpaper" StyledToolTip { - content: Translation.tr("Pick wallpaper image on your system") + text: Translation.tr("Pick wallpaper image on your system") } onClicked: { Quickshell.execDetached(`${Directories.wallpaperSwitchScriptPath}`); @@ -161,7 +161,7 @@ ContentPage { Config.options.appearance.transparency.enable = checked; } StyledToolTip { - content: Translation.tr("Might look ass. Unsupported.") + text: Translation.tr("Might look ass. Unsupported.") } } } diff --git a/.config/quickshell/ii/modules/settings/ServicesConfig.qml b/.config/quickshell/ii/modules/settings/ServicesConfig.qml index f28eab31a..dc7817cab 100644 --- a/.config/quickshell/ii/modules/settings/ServicesConfig.qml +++ b/.config/quickshell/ii/modules/settings/ServicesConfig.qml @@ -69,7 +69,7 @@ ContentPage { Config.options.search.sloppy = checked; } StyledToolTip { - content: Translation.tr("Could be better if you make a ton of typos,\nbut results can be weird and might not work with acronyms\n(e.g. \"GIMP\" might not give you the paint program)") + text: Translation.tr("Could be better if you make a ton of typos,\nbut results can be weird and might not work with acronyms\n(e.g. \"GIMP\" might not give you the paint program)") } } diff --git a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml index 22a64412c..f84972f3e 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -257,7 +257,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) } StyledToolTip { - content: statusItem.description + text: statusItem.description extraVisibleCondition: false alternativeVisibleCondition: statusItem.containsMouse } diff --git a/.config/quickshell/ii/modules/sidebarLeft/ApiInputBoxIndicator.qml b/.config/quickshell/ii/modules/sidebarLeft/ApiInputBoxIndicator.qml index 878fba2b6..5cd969a24 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/ApiInputBoxIndicator.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/ApiInputBoxIndicator.qml @@ -41,7 +41,7 @@ Item { // Model indicator id: toolTip extraVisibleCondition: false alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered - content: root.tooltipText + text: root.tooltipText } } } diff --git a/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml index 87bfba710..2072a67ae 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml @@ -164,7 +164,7 @@ Rectangle { text: "visibility_off" } StyledToolTip { - content: Translation.tr("Not visible to model") + text: Translation.tr("Not visible to model") } } @@ -191,7 +191,7 @@ Rectangle { } StyledToolTip { - content: Translation.tr("Copy") + text: Translation.tr("Copy") } } AiMessageControlButton { @@ -206,7 +206,7 @@ Rectangle { } } StyledToolTip { - content: root.editing ? Translation.tr("Save") : Translation.tr("Edit") + text: root.editing ? Translation.tr("Save") : Translation.tr("Edit") } } AiMessageControlButton { @@ -217,7 +217,7 @@ Rectangle { root.renderMarkdown = !root.renderMarkdown } StyledToolTip { - content: Translation.tr("View Markdown source") + text: Translation.tr("View Markdown source") } } AiMessageControlButton { @@ -227,7 +227,7 @@ Rectangle { Ai.removeMessage(root.messageIndex) } StyledToolTip { - content: Translation.tr("Delete") + text: Translation.tr("Delete") } } } diff --git a/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml index f8b0bac3e..dbe31d45d 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml @@ -84,7 +84,7 @@ ColumnLayout { } } StyledToolTip { - content: Translation.tr("Copy code") + text: Translation.tr("Copy code") } } AiMessageControlButton { @@ -114,7 +114,7 @@ ColumnLayout { } } StyledToolTip { - content: Translation.tr("Save to Downloads") + text: Translation.tr("Save to Downloads") } } } diff --git a/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml b/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml index b2eef2939..8df196d9a 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml @@ -41,7 +41,7 @@ Button { } StyledToolTip { - content: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}` + text: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}` } padding: 0 diff --git a/.config/quickshell/ii/modules/sidebarRight/SidebarRightContent.qml b/.config/quickshell/ii/modules/sidebarRight/SidebarRightContent.qml index 636d57729..ed2e4376f 100644 --- a/.config/quickshell/ii/modules/sidebarRight/SidebarRightContent.qml +++ b/.config/quickshell/ii/modules/sidebarRight/SidebarRightContent.qml @@ -88,7 +88,7 @@ Item { Quickshell.reload(true); } StyledToolTip { - content: Translation.tr("Reload Hyprland & Quickshell") + text: Translation.tr("Reload Hyprland & Quickshell") } } QuickToggleButton { @@ -99,7 +99,7 @@ Item { Quickshell.execDetached(["qs", "-p", root.settingsQmlPath]); } StyledToolTip { - content: Translation.tr("Settings") + text: Translation.tr("Settings") } } QuickToggleButton { @@ -109,7 +109,7 @@ Item { GlobalStates.sessionOpen = true; } StyledToolTip { - content: Translation.tr("Session") + text: Translation.tr("Session") } } } diff --git a/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml b/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml index 6b5e5aa13..37a45db08 100644 --- a/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml +++ b/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml @@ -30,7 +30,7 @@ RippleButton { } StyledToolTip { - content: tooltipText + text: tooltipText extraVisibleCondition: tooltipText.length > 0 } } \ No newline at end of file diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml index 1a4c053ed..af8a5cfc8 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml @@ -21,7 +21,7 @@ QuickToggleButton { GlobalStates.sidebarRightOpen = false } StyledToolTip { - content: Translation.tr("%1 | Right-click to configure").arg( + text: Translation.tr("%1 | Right-click to configure").arg( (BluetoothStatus.firstActiveDevice?.name ?? Translation.tr("Bluetooth")) + (BluetoothStatus.activeDeviceCount > 1 ? ` +${BluetoothStatus.activeDeviceCount - 1}` : "") ) diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml index 39416ab22..1aebffa9a 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml @@ -87,6 +87,6 @@ QuickToggleButton { } } StyledToolTip { - content: Translation.tr("Cloudflare WARP (1.1.1.1)") + text: Translation.tr("Cloudflare WARP (1.1.1.1)") } } diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml index af428c54b..643764ff3 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml @@ -26,6 +26,6 @@ QuickToggleButton { } StyledToolTip { - content: Translation.tr("EasyEffects | Right-click to configure") + text: Translation.tr("EasyEffects | Right-click to configure") } } diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml index 1907080e8..e2b03ebef 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml @@ -26,6 +26,6 @@ QuickToggleButton { } } StyledToolTip { - content: Translation.tr("Game mode") + text: Translation.tr("Game mode") } } \ No newline at end of file diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml index 2b8f8b170..b6bce02f5 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml @@ -10,7 +10,7 @@ QuickToggleButton { Idle.toggleInhibit() } StyledToolTip { - content: Translation.tr("Keep system awake") + text: Translation.tr("Keep system awake") } } diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml index cb9e0d8e7..bb7d0969c 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml @@ -18,6 +18,6 @@ QuickToggleButton { GlobalStates.sidebarRightOpen = false } StyledToolTip { - content: Translation.tr("%1 | Right-click to configure").arg(Network.networkName) + text: Translation.tr("%1 | Right-click to configure").arg(Network.networkName) } } diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml index f0265126c..5fda831e1 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml @@ -23,6 +23,6 @@ QuickToggleButton { } StyledToolTip { - content: Translation.tr("Night Light | Right-click to toggle Auto mode") + text: Translation.tr("Night Light | Right-click to toggle Auto mode") } } diff --git a/.config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml b/.config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml index b0a6e7b9a..d2fe0abad 100644 --- a/.config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml +++ b/.config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml @@ -26,7 +26,7 @@ RippleButton { } StyledToolTip { - content: tooltipText + text: tooltipText extraVisibleCondition: tooltipText.length > 0 } } \ No newline at end of file diff --git a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml index 7e544d218..1e714d39b 100644 --- a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml +++ b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml @@ -334,7 +334,7 @@ MouseArea { iconSize: Appearance.font.pixelSize.larger } StyledToolTip { - content: Translation.tr("Use the system file picker instead\nRight-click to make this the default behavior") + text: Translation.tr("Use the system file picker instead\nRight-click to make this the default behavior") } } @@ -352,7 +352,7 @@ MouseArea { iconSize: Appearance.font.pixelSize.larger } StyledToolTip { - content: Translation.tr("Pick random from this folder") + text: Translation.tr("Pick random from this folder") } } @@ -366,7 +366,7 @@ MouseArea { iconSize: Appearance.font.pixelSize.larger } StyledToolTip { - content: Translation.tr("Click to toggle light/dark mode\n(applied when wallpaper is chosen)") + text: Translation.tr("Click to toggle light/dark mode\n(applied when wallpaper is chosen)") } } @@ -417,7 +417,7 @@ MouseArea { iconSize: Appearance.font.pixelSize.larger } StyledToolTip { - content: Translation.tr("Cancel wallpaper selection") + text: Translation.tr("Cancel wallpaper selection") } } } diff --git a/.config/quickshell/ii/settings.qml b/.config/quickshell/ii/settings.qml index 0f52b2382..d4724b534 100644 --- a/.config/quickshell/ii/settings.qml +++ b/.config/quickshell/ii/settings.qml @@ -177,7 +177,7 @@ ApplicationWindow { } StyledToolTip { - content: Translation.tr("Open the shell config file.\nIf the button doesn't work or doesn't open in your favorite editor,\nyou can manually open ~/.config/illogical-impulse/config.json") + text: Translation.tr("Open the shell config file.\nIf the button doesn't work or doesn't open in your favorite editor,\nyou can manually open ~/.config/illogical-impulse/config.json") } } diff --git a/.config/quickshell/ii/welcome.qml b/.config/quickshell/ii/welcome.qml index b92534039..a0699ac7c 100644 --- a/.config/quickshell/ii/welcome.qml +++ b/.config/quickshell/ii/welcome.qml @@ -111,7 +111,7 @@ ApplicationWindow { } StyledToolTip { - content: Translation.tr("Tip: Close a window with Super+Q") + text: Translation.tr("Tip: Close a window with Super+Q") } } } @@ -250,13 +250,13 @@ ApplicationWindow { konachanWallProc.running = true; } StyledToolTip { - content: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers") + text: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers") } } RippleButtonWithIcon { materialIcon: "wallpaper" StyledToolTip { - content: Translation.tr("Pick wallpaper image on your system") + text: Translation.tr("Pick wallpaper image on your system") } onClicked: { Quickshell.execDetached([`${Directories.wallpaperSwitchScriptPath}`]);