diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index af6f25b7..70079385 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -18,6 +18,10 @@ "label": "Benutzeroberfläche", "description": "Passen Sie das Aussehen, die Haptik und das Verhalten der Oberfläche an." }, + "tooltips": { + "label": "Tooltips anzeigen", + "description": "Tooltips in der gesamten Benutzeroberfläche aktivieren oder deaktivieren." + }, "dim-desktop": { "label": "Desktop abdunkeln", "description": "Desktop abdunkeln, wenn Panels oder Menüs geöffnet sind." diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index d939ba82..8aa238bf 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -20,6 +20,10 @@ "label": "User interface", "description": "Customize the look, feel, and behavior of the interface." }, + "tooltips": { + "label": "Show tooltips", + "description": "Enable or disable tooltips throughout the interface." + }, "dim-desktop": { "label": "Dim desktop", "description": "Dim the desktop when panels or menus are open." diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index b31971ed..c0f69fb6 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -18,6 +18,10 @@ "label": "Interfaz de usuario", "description": "Personaliza la apariencia, sensación y comportamiento de la interfaz." }, + "tooltips": { + "label": "Mostrar tooltips", + "description": "Activar o desactivar tooltips en toda la interfaz." + }, "dim-desktop": { "label": "Atenuar escritorio", "description": "Atenúa el escritorio cuando los paneles o menús están abiertos." diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 27f6bed4..d2df99a3 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -18,6 +18,10 @@ "label": "Interface utilisateur", "description": "Personnalisez l'apparence, l'ergonomie et le comportement de l'interface." }, + "tooltips": { + "label": "Afficher les tooltips", + "description": "Activer ou désactiver les tooltips dans toute l'interface." + }, "dim-desktop": { "label": "Assombrir le bureau", "description": "Assombrir le bureau lorsque des panneaux ou des menus sont ouverts." diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index f7bfa04c..1f6a20d2 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -18,6 +18,10 @@ "label": "Interface do usuário", "description": "Personalize a aparência, a sensação e o comportamento da interface." }, + "tooltips": { + "label": "Mostrar tooltips", + "description": "Ativar ou desativar tooltips em toda a interface." + }, "dim-desktop": { "label": "Escurecer área de trabalho", "description": "Escurece a área de trabalho quando painéis ou menus estão abertos." diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 594794d2..b37eb7ce 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -18,6 +18,10 @@ "label": "用户界面", "description": "自定义界面的外观、风格和行为。" }, + "tooltips": { + "label": "显示工具提示", + "description": "在整个界面中启用或禁用工具提示。" + }, "dim-desktop": { "label": "调暗桌面", "description": "当面板或菜单打开时调暗桌面。" diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 91fcf206..a80e2bb4 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -1,5 +1,5 @@ { - "settingsVersion": 14, + "settingsVersion": 15, "bar": { "position": "top", "backgroundOpacity": 1, @@ -156,7 +156,8 @@ "fontDefaultScale": 1, "fontFixedScale": 1, "monitorsScaling": [], - "idleInhibitorEnabled": false + "idleInhibitorEnabled": false, + "tooltipsEnabled": true }, "brightness": { "brightnessStep": 5 diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 59ed5465..c0939caf 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -128,7 +128,7 @@ Singleton { JsonAdapter { id: adapter - property int settingsVersion: 14 + property int settingsVersion: 15 // bar property JsonObject bar: JsonObject { @@ -303,6 +303,7 @@ Singleton { property real fontFixedScale: 1.0 property list monitorsScaling: [] property bool idleInhibitorEnabled: false + property bool tooltipsEnabled: true } // brightness diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index 734260c1..0871b906 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -82,6 +82,13 @@ ColumnLayout { onToggled: checked => Settings.data.general.dimDesktop = checked } + NToggle { + label: I18n.tr("settings.general.ui.tooltips.label") + description: I18n.tr("settings.general.ui.tooltips.description") + checked: Settings.data.ui.tooltipsEnabled + onToggled: checked => Settings.data.ui.tooltipsEnabled = checked + } + ColumnLayout { spacing: Style.marginXXS * scaling Layout.fillWidth: true diff --git a/Services/TooltipService.qml b/Services/TooltipService.qml index b1ea68b2..f083848f 100644 --- a/Services/TooltipService.qml +++ b/Services/TooltipService.qml @@ -16,6 +16,10 @@ Singleton { } function show(screen, target, text, direction, delay) { + if (!Settings.data.ui.tooltipsEnabled) { + return + } + // Don't create if no text if (!screen || !target || !text) { Logger.log("Tooltip", "No target or text")