From a63e28b5d51166d656ec1ed8eec0a4d094a99749 Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Tue, 24 Oct 2023 22:42:56 +0200 Subject: [PATCH] Replace theme with invert icon --- app/SysTray-X/SysTray-X-app/preferences.ui | 315 +++++++++++---------- webext/_locales/de/messages.json | 16 +- webext/_locales/el/messages.json | 16 +- webext/_locales/en-US/messages.json | 16 +- webext/_locales/it/messages.json | 16 +- webext/_locales/nl/messages.json | 16 +- webext/_locales/pt-BR/messages.json | 16 +- webext/_locales/ru/messages.json | 16 +- webext/background.js | 18 +- webext/css/options.css | 1 - webext/options.html | 34 +-- webext/options.js | 47 ++- 12 files changed, 220 insertions(+), 307 deletions(-) diff --git a/app/SysTray-X/SysTray-X-app/preferences.ui b/app/SysTray-X/SysTray-X-app/preferences.ui index c63bfa1..a04b401 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.ui +++ b/app/SysTray-X/SysTray-X-app/preferences.ui @@ -6,7 +6,7 @@ 0 0 - 541 + 556 424 @@ -343,162 +343,171 @@ - + Mail notification icon - + - - - QLayout::SetFixedSize + + + Icon - - - - Blank icon - - - true - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QLayout::SetFixedSize - - - - - New mail icon - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QLayout::SetMaximumSize - - - - - Custom icon - - - iconTypeGroup - - - - - - - - - - - - - - Choose - - - false - - - - - - - - - - - No icon - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Default Thunderbird - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + QLayout::SetFixedSize + + + + + Blank icon + + + true + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QLayout::SetFixedSize + + + + + New mail icon + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QLayout::SetMaximumSize + + + + + Custom icon + + + iconTypeGroup + + + + + + + + + + + + + + Choose + + + false + + + + + + + + + + + No icon + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Default Thunderbird + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + @@ -523,7 +532,7 @@ - + Qt::Vertical @@ -536,7 +545,7 @@ - + Qt::Vertical diff --git a/webext/_locales/de/messages.json b/webext/_locales/de/messages.json index cac7396..1f6311f 100644 --- a/webext/_locales/de/messages.json +++ b/webext/_locales/de/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Thema", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Licht", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Dunkel", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Symbol umkehren", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/el/messages.json b/webext/_locales/el/messages.json index e20a553..c96980a 100644 --- a/webext/_locales/el/messages.json +++ b/webext/_locales/el/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "θέμα", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "φως", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "σκοτάδι", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Αντιστρέψτε εικονίδιο", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/en-US/messages.json b/webext/_locales/en-US/messages.json index 72c77a5..f9c7be4 100644 --- a/webext/_locales/en-US/messages.json +++ b/webext/_locales/en-US/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Theme", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Light", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Dark", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Invert icon", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/it/messages.json b/webext/_locales/it/messages.json index 3bc806f..6791184 100644 --- a/webext/_locales/it/messages.json +++ b/webext/_locales/it/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Tema", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Leggero", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Scuro", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Icona inverti", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/nl/messages.json b/webext/_locales/nl/messages.json index b1eeca5..06269c3 100644 --- a/webext/_locales/nl/messages.json +++ b/webext/_locales/nl/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Thema", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Licht", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Donker", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Inverteer pictogram", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/pt-BR/messages.json b/webext/_locales/pt-BR/messages.json index a338239..a1f79d5 100644 --- a/webext/_locales/pt-BR/messages.json +++ b/webext/_locales/pt-BR/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Tema", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Claro", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Escuro", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Ícone inverter", + "description": "Invert icon" }, "count": { diff --git a/webext/_locales/ru/messages.json b/webext/_locales/ru/messages.json index 761f870..3befdc5 100644 --- a/webext/_locales/ru/messages.json +++ b/webext/_locales/ru/messages.json @@ -204,19 +204,9 @@ "description": "Unread Icon option 4" }, - "icons_theme": { - "message": "Tема", - "description": "The theme" - }, - - "icons_theme_light": { - "message": "Светлая", - "description": "The light theme" - }, - - "icons_theme_dark": { - "message": "Темная", - "description": "The dark theme" + "icons_invert_icon": { + "message": "Инвертировать значок", + "description": "Invert icon" }, "count": { diff --git a/webext/background.js b/webext/background.js index 5441f3f..dd5ec2a 100644 --- a/webext/background.js +++ b/webext/background.js @@ -570,7 +570,7 @@ SysTrayX.Messaging = { "iconType", "iconMime", "icon", - "theme", + "invertIcon", "showNumber", "showNewIndicator", "countType", @@ -606,7 +606,7 @@ SysTrayX.Messaging = { const iconType = result.iconType || "0"; const iconMime = result.iconMime || "image/png"; const icon = result.icon || []; - const theme = result.theme || "0"; + const invertIcon = result.invertIcon || "false"; const showNumber = result.showNumber || "true"; const showNewIndicator = result.showNewIndicator || "false"; const countType = result.countType || "0"; @@ -627,12 +627,6 @@ SysTrayX.Messaging = { const closeApp = result.closeApp || ""; const closeAppArgs = result.closeAppArgs || ""; - if (theme == "0" && numberColor == "#ffffff") { - numberColor = "#000000"; - } else if (theme == "1" && numberColor == "#000000") { - numberColor = "#ffffff"; - } - // Send it to the app SysTrayX.Link.postSysTrayXMessage({ preferences: { @@ -649,7 +643,7 @@ SysTrayX.Messaging = { iconType, iconMime, icon, - theme, + invertIcon, showNumber, showNewIndicator, countType, @@ -820,10 +814,10 @@ SysTrayX.Link = { }); } - const theme = response["preferences"].theme; - if (theme) { + const invertIcon = response["preferences"].invertIcon; + if (invertIcon) { await storage().set({ - theme: theme, + invertIcon: invertIcon, }); } diff --git a/webext/css/options.css b/webext/css/options.css index 02b62fc..9a5a6cc 100644 --- a/webext/css/options.css +++ b/webext/css/options.css @@ -80,7 +80,6 @@ body { #defaulticonselect, #iconselect, #numberprops, -#themeselect, #counttypeselect, #newindicatorselect, #storageselect, diff --git a/webext/options.html b/webext/options.html index f791a50..39ef51b 100644 --- a/webext/options.html +++ b/webext/options.html @@ -334,27 +334,19 @@ - - - - - - - - -
- __MSG_icons_theme__ -
- - -
- - -
+
+
+ + +
+