From eafcb91b8bd14242a8a9dcfb46cc945e10f15487 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Tue, 10 Mar 2026 09:48:17 -0400 Subject: [PATCH] feat(settings): add translucent widgets toggle to gate smart transparency --- Assets/Translations/de.json | 4 +++- Assets/Translations/en.json | 4 +++- Assets/Translations/es.json | 4 +++- Assets/Translations/fr.json | 4 +++- Assets/Translations/hu.json | 4 +++- Assets/Translations/it.json | 4 +++- Assets/Translations/ja.json | 4 +++- Assets/Translations/ko-KR.json | 4 +++- Assets/Translations/nl.json | 4 +++- Assets/Translations/pl.json | 4 +++- Assets/Translations/pt.json | 4 +++- Assets/Translations/ru.json | 4 +++- Assets/Translations/sv.json | 4 +++- Assets/Translations/tr.json | 4 +++- Assets/Translations/uk-UA.json | 4 +++- Assets/Translations/zh-CN.json | 4 +++- Assets/Translations/zh-TW.json | 4 +++- Assets/settings-default.json | 1 + Assets/settings-search-index.json | 9 +++++++++ Commons/Color.qml | 3 +++ Commons/Settings.qml | 1 + .../Panels/Settings/Tabs/UserInterface/PanelsSubTab.qml | 8 ++++++++ 22 files changed, 73 insertions(+), 17 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index a6726370e..bc816fe42 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1684,7 +1684,9 @@ "shadows-label": "Schlagschatten", "title": "Benutzeroberfläche", "tooltips-description": "Tooltips in der gesamten Benutzeroberfläche aktivieren oder deaktivieren.", - "tooltips-label": "Tooltips anzeigen" + "tooltips-label": "Tooltips anzeigen", + "translucent-widgets-description": "Mache Schaltflächen, Tabs und andere Widgets in Panels halbtransparent.", + "translucent-widgets-label": "Transluzente Widgets" }, "wallpaper": { "automation-change-mode-alphabetical": "Alphabetisch", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 0eaa1123c..ff489d100 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1684,7 +1684,9 @@ "shadows-label": "Drop shadows", "title": "User Interface", "tooltips-description": "Enable or disable tooltips throughout the interface.", - "tooltips-label": "Show tooltips" + "tooltips-label": "Show tooltips", + "translucent-widgets-description": "Make buttons, tabs, and other widgets inside panels semi-transparent.", + "translucent-widgets-label": "Translucent widgets" }, "wallpaper": { "automation-change-mode-alphabetical": "Alphabetical", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 34fee7ce3..831ab5ae6 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1684,7 +1684,9 @@ "shadows-label": "Sombras paralelas", "title": "Interfaz de usuario", "tooltips-description": "Activar o desactivar los avisos emergentes en toda la interfaz.", - "tooltips-label": "Mostrar textos emergentes" + "tooltips-label": "Mostrar textos emergentes", + "translucent-widgets-description": "Haz que los botones, pestañas y otros widgets dentro de los paneles sean semitransparentes.", + "translucent-widgets-label": "Widgets translúcidos" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabético", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index c2c8a634d..383ad215f 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -1684,7 +1684,9 @@ "shadows-label": "Ombres portées", "title": "Interface utilisateur", "tooltips-description": "Activer ou désactiver les infobulles dans toute l'interface.", - "tooltips-label": "Afficher les infobulles" + "tooltips-label": "Afficher les infobulles", + "translucent-widgets-description": "Rendre les boutons, onglets et autres widgets à l'intérieur des panneaux semi-transparents.", + "translucent-widgets-label": "Widgets translucides" }, "wallpaper": { "automation-change-mode-alphabetical": "Alphabétique", diff --git a/Assets/Translations/hu.json b/Assets/Translations/hu.json index 3f9dffedd..3c135fe82 100644 --- a/Assets/Translations/hu.json +++ b/Assets/Translations/hu.json @@ -1684,7 +1684,9 @@ "shadows-label": "Árnyékok", "title": "Felhasználói felület", "tooltips-description": "Engedélyezi vagy letiltja az eszköztippeket a felületen.", - "tooltips-label": "Eszköztippek megjelenítése" + "tooltips-label": "Eszköztippek megjelenítése", + "translucent-widgets-description": "Tedd a gombokat, füleket és egyéb widgeteket a paneleken belül félig átlátszóvá.", + "translucent-widgets-label": "Áttetsző widgetek" }, "wallpaper": { "automation-change-mode-alphabetical": "Ábécérend", diff --git a/Assets/Translations/it.json b/Assets/Translations/it.json index 8ac839fb4..0905dbf69 100644 --- a/Assets/Translations/it.json +++ b/Assets/Translations/it.json @@ -1684,7 +1684,9 @@ "shadows-label": "Ombre esterne", "title": "Interfaccia utente", "tooltips-description": "Abilita o disabilita i tooltip in tutta l’interfaccia.", - "tooltips-label": "Mostra tooltip" + "tooltips-label": "Mostra tooltip", + "translucent-widgets-description": "Rendi semitrasparenti i pulsanti, le schede e gli altri widget all'interno dei pannelli.", + "translucent-widgets-label": "Widget traslucidi" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabetico", diff --git a/Assets/Translations/ja.json b/Assets/Translations/ja.json index 17c1c8790..1869f9dea 100644 --- a/Assets/Translations/ja.json +++ b/Assets/Translations/ja.json @@ -1684,7 +1684,9 @@ "shadows-label": "ドロップシャドウ", "title": "ユーザーインターフェース", "tooltips-description": "インターフェース全体のツールチップの有効・無効を切り替えます。", - "tooltips-label": "ツールチップを表示" + "tooltips-label": "ツールチップを表示", + "translucent-widgets-description": "パネル内のボタン、タブ、その他のウィジェットを半透明にする。", + "translucent-widgets-label": "半透明のウィジェット" }, "wallpaper": { "automation-change-mode-alphabetical": "アルファベット順", diff --git a/Assets/Translations/ko-KR.json b/Assets/Translations/ko-KR.json index 75f5b82e1..a4017215c 100644 --- a/Assets/Translations/ko-KR.json +++ b/Assets/Translations/ko-KR.json @@ -1684,7 +1684,9 @@ "shadows-label": "그림자", "title": "사용자 인터페이스", "tooltips-description": "인터페이스 전반에 툴팁을 활성화하거나 비활성화합니다.", - "tooltips-label": "툴팁 표시" + "tooltips-label": "툴팁 표시", + "translucent-widgets-description": "패널 내의 버튼, 탭 및 기타 위젯을 반투명하게 만듭니다.", + "translucent-widgets-label": "반투명 위젯" }, "wallpaper": { "automation-change-mode-alphabetical": "알파벳순", diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index eb0897ea4..70da20f45 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -1684,7 +1684,9 @@ "shadows-label": "Slagschaduwen", "title": "Gebruikersinterface", "tooltips-description": "Schakel tooltips in of uit in de hele interface.", - "tooltips-label": "Tooltips tonen" + "tooltips-label": "Tooltips tonen", + "translucent-widgets-description": "Maak knoppen, tabbladen en andere widgets in panelen semi-transparant.", + "translucent-widgets-label": "Doorzichtige widgets" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabetisch", diff --git a/Assets/Translations/pl.json b/Assets/Translations/pl.json index 753c6fa95..e6d91c38b 100644 --- a/Assets/Translations/pl.json +++ b/Assets/Translations/pl.json @@ -1684,7 +1684,9 @@ "shadows-label": "Cienie", "title": "Interfejs użytkownika", "tooltips-description": "Włącz lub wyłącz podpowiedzi w całym interfejsie.", - "tooltips-label": "Pokaż podpowiedzi" + "tooltips-label": "Pokaż podpowiedzi", + "translucent-widgets-description": "Spraw, aby przyciski, zakładki i inne widżety w panelach były półprzezroczyste.", + "translucent-widgets-label": "Półprzezroczyste widżety" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabetyczny", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index bf68bbcda..5f4a28bad 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1684,7 +1684,9 @@ "shadows-label": "Sombras projetadas", "title": "Interface do usuário", "tooltips-description": "Ativar ou desativar dicas de ferramentas em toda a interface.", - "tooltips-label": "Mostrar dicas de ferramenta" + "tooltips-label": "Mostrar dicas de ferramenta", + "translucent-widgets-description": "Torne botões, abas e outros widgets dentro dos painéis semitransparentes.", + "translucent-widgets-label": "Widgets translúcidos" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabético", diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 2c0240e0c..a18ef99d0 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -1684,7 +1684,9 @@ "shadows-label": "Отбрасываемые тени", "title": "Пользовательский интерфейс", "tooltips-description": "Включить или отключить всплывающие подсказки во всем интерфейсе.", - "tooltips-label": "Показывать всплывающие подсказки" + "tooltips-label": "Показывать всплывающие подсказки", + "translucent-widgets-description": "Сделайте кнопки, вкладки и другие виджеты внутри панелей полупрозрачными.", + "translucent-widgets-label": "Полупрозрачные виджеты" }, "wallpaper": { "automation-change-mode-alphabetical": "Алфавитный", diff --git a/Assets/Translations/sv.json b/Assets/Translations/sv.json index 95c13a329..39decff2e 100644 --- a/Assets/Translations/sv.json +++ b/Assets/Translations/sv.json @@ -1684,7 +1684,9 @@ "shadows-label": "Fallskugga", "title": "Användargränssnitt", "tooltips-description": "Aktivera eller inaktivera verktygstips i hela gränssnittet.", - "tooltips-label": "Visa verktygstips" + "tooltips-label": "Visa verktygstips", + "translucent-widgets-description": "Gör knappar, flikar och andra widgets inuti paneler halvtransparenta.", + "translucent-widgets-label": "Genomskinliga widgetar" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabetiskt", diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index baa098bd0..f874277d0 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -1684,7 +1684,9 @@ "shadows-label": "Gölge efektleri", "title": "Kullanıcı arayüzü", "tooltips-description": "Arayüz genelindeki ipuçlarını etkinleştirin veya devre dışı bırakın.", - "tooltips-label": "İpuçlarını göster" + "tooltips-label": "İpuçlarını göster", + "translucent-widgets-description": "Panellerin içindeki düğmeleri, sekmeleri ve diğer widget'ları yarı saydam yapın.", + "translucent-widgets-label": "Yarı saydam widget'lar" }, "wallpaper": { "automation-change-mode-alphabetical": "Alfabetik", diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 7bfa3219c..3ea9ef8bc 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -1684,7 +1684,9 @@ "shadows-label": "Тіні", "title": "Користувацький інтерфейс", "tooltips-description": "Увімкнути або вимкнути підказки в інтерфейсі.", - "tooltips-label": "Показувати підказки" + "tooltips-label": "Показувати підказки", + "translucent-widgets-description": "Зробіть кнопки, вкладки та інші віджети всередині панелей напівпрозорими.", + "translucent-widgets-label": "Напівпрозорі віджети" }, "wallpaper": { "automation-change-mode-alphabetical": "Алфавітний", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 5c81f8c1f..9e7defc8c 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1684,7 +1684,9 @@ "shadows-label": "阴影", "title": "用户界面", "tooltips-description": "启用或禁用整个界面的提示信息。", - "tooltips-label": "显示提示信息(Tooltip)" + "tooltips-label": "显示提示信息(Tooltip)", + "translucent-widgets-description": "使面板内的按钮、选项卡和其他小部件半透明。", + "translucent-widgets-label": "半透明小部件" }, "wallpaper": { "automation-change-mode-alphabetical": "按字母顺序", diff --git a/Assets/Translations/zh-TW.json b/Assets/Translations/zh-TW.json index 62f35c773..e1ba75411 100644 --- a/Assets/Translations/zh-TW.json +++ b/Assets/Translations/zh-TW.json @@ -1684,7 +1684,9 @@ "shadows-label": "陰影", "title": "使用者介面", "tooltips-description": "在整個介面啟用或停用提示框", - "tooltips-label": "顯示提示框" + "tooltips-label": "顯示提示框", + "translucent-widgets-description": "使面板內的按鈕、分頁和其他小部件半透明。", + "translucent-widgets-label": "半透明小工具" }, "wallpaper": { "automation-change-mode-alphabetical": "照字母排序", diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 6ca0e0979..de2d6c2a3 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -152,6 +152,7 @@ "scrollbarAlwaysVisible": true, "boxBorderEnabled": false, "panelBackgroundOpacity": 0.93, + "translucentWidgets": false, "panelsAttachedToBar": true, "settingsPanelMode": "attached", "settingsPanelSideBarCardStyle": false diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index 36128188d..7ba1e5b15 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -2052,6 +2052,15 @@ "subTab": 1, "subTabLabel": "common.panels" }, + { + "labelKey": "panels.user-interface.translucent-widgets-label", + "descriptionKey": "panels.user-interface.translucent-widgets-description", + "widget": "NToggle", + "tab": 1, + "tabLabel": "panels.user-interface.title", + "subTab": 1, + "subTabLabel": "common.panels" + }, { "labelKey": "panels.user-interface.dimmer-opacity-label", "descriptionKey": "panels.user-interface.dimmer-opacity-description", diff --git a/Commons/Color.qml b/Commons/Color.qml index c870bb727..680600424 100644 --- a/Commons/Color.qml +++ b/Commons/Color.qml @@ -326,6 +326,9 @@ Singleton { // Smart alpha calculation: automatically makes light mode more transparent function smartAlpha(baseColor, minAlpha = 0.4) { + if (!Settings.data.ui.translucentWidgets) + return baseColor; + let baseOpacity = Settings.data.ui.panelBackgroundOpacity; let targetOpacity = Settings.data.colorSchemes.darkMode ? baseOpacity : Math.pow(baseOpacity, 2); let alpha = Math.max(targetOpacity, minAlpha); diff --git a/Commons/Settings.qml b/Commons/Settings.qml index d95590157..ae409a8f5 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -330,6 +330,7 @@ Singleton { property bool scrollbarAlwaysVisible: true property bool boxBorderEnabled: false property real panelBackgroundOpacity: 0.93 + property bool translucentWidgets: false property bool panelsAttachedToBar: true property string settingsPanelMode: "attached" // "centered", "attached", "window" property bool settingsPanelSideBarCardStyle: false diff --git a/Modules/Panels/Settings/Tabs/UserInterface/PanelsSubTab.qml b/Modules/Panels/Settings/Tabs/UserInterface/PanelsSubTab.qml index af01fe3c6..bd79d9524 100644 --- a/Modules/Panels/Settings/Tabs/UserInterface/PanelsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/UserInterface/PanelsSubTab.qml @@ -41,6 +41,14 @@ ColumnLayout { text: Math.floor(Settings.data.ui.panelBackgroundOpacity * 100) + "%" } + NToggle { + label: I18n.tr("panels.user-interface.translucent-widgets-label") + description: I18n.tr("panels.user-interface.translucent-widgets-description") + checked: Settings.data.ui.translucentWidgets + defaultValue: Settings.getDefaultValue("ui.translucentWidgets") + onToggled: checked => Settings.data.ui.translucentWidgets = checked + } + NValueSlider { Layout.fillWidth: true label: I18n.tr("panels.user-interface.dimmer-opacity-label")