From c007449ec38f49e18ed7d6b8f9ef74c5bd5c015a Mon Sep 17 00:00:00 2001 From: Sahil Gautam Date: Fri, 27 Dec 2024 02:07:00 +0530 Subject: tdf#164393 Change themes UI as per UX feedback - inlined the controls for color/image with the labels. also inlined the image stretched/tiled radio buttons. - There were plans to change the default theme's name from "Automatic" to "Default", but due to string freeze for 25-2, moved that to a separate patch which won't be backported to 25-2. Change-Id: I8470dbf1c42d1b402d17f0feeec12d190e879ca6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179405 Reviewed-by: Sahil Gautam Tested-by: Jenkins --- cui/inc/strings.hrc | 3 -- cui/source/options/appearance.cxx | 19 ------- cui/source/options/appearance.hxx | 1 - cui/uiconfig/ui/appearance.ui | 108 +++++++++++++++++--------------------- 4 files changed, 48 insertions(+), 83 deletions(-) diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index e200921a7ac3..9d1687b72596 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -448,9 +448,6 @@ #define BMP_TIGER NC_("BMP_TIGER", "Tiger") #define BMP_ZEBRA NC_("BMP_ZEBRA", "Zebra") -#define LIGHT_COLOR_LBL NC_("LIGHT_COLOR_LBL", "Light") -#define DARK_COLOR_LBL NC_("DARK_COLOR_LBL", "Dark") - // Translated Registry Entries #define REG_DOCCOLOR NC_("REG_DOCCOLOR", "Document background") #define REG_DOCBOUNDARIES NC_("REG_DOCBOUNDARIES", "Document boundaries") diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index f36c6255809e..46c80fd61bbe 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -103,7 +103,6 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage, , m_xColorEntryBtn(m_xBuilder->weld_combo_box(u"registrydropdown"_ustr)) , m_xColorChangeBtn((new ColorListBox(m_xBuilder->weld_menu_button(u"colorsdropdownbtn"_ustr), [this] { return GetFrameWeld(); }))) - , m_xColorLbl(m_xBuilder->weld_label(u"colorlbl"_ustr)) , m_xShowInDocumentChkBtn(m_xBuilder->weld_check_button(u"showindocumentchkbtn"_ustr)) , m_xColorRadioBtn(m_xBuilder->weld_radio_button(u"colorradiobtn"_ustr)) , m_xImageRadioBtn(m_xBuilder->weld_radio_button(u"imageradiobtn"_ustr)) @@ -541,24 +540,6 @@ void SvxAppearanceTabPage::EnableImageControls(bool bEnabled) void SvxAppearanceTabPage::UpdateColorDropdown() { - switch (eCurrentAppearanceMode) - { - case Appearance::LIGHT: - m_xColorLbl->set_label(CuiResId(LIGHT_COLOR_LBL)); - break; - case Appearance::DARK: - m_xColorLbl->set_label(CuiResId(DARK_COLOR_LBL)); - break; - case Appearance::SYSTEM: - { - if (IsDarkModeEnabled()) - m_xColorLbl->set_label(CuiResId(DARK_COLOR_LBL)); - else - m_xColorLbl->set_label(CuiResId(LIGHT_COLOR_LBL)); - } - break; - } - // update color to light/dark ColorConfigEntry nEntry = GetActiveEntry(); if (nEntry == ColorConfigEntryCount) diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index b6c78c69cf0b..5dc915a5f49e 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -53,7 +53,6 @@ private: std::unique_ptr m_xAppearanceDark; std::unique_ptr m_xColorEntryBtn; std::unique_ptr m_xColorChangeBtn; - std::unique_ptr m_xColorLbl; std::unique_ptr m_xShowInDocumentChkBtn; std::unique_ptr m_xColorRadioBtn; diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui index fb47f7663724..453675fa82c4 100644 --- a/cui/uiconfig/ui/appearance.ui +++ b/cui/uiconfig/ui/appearance.ui @@ -257,7 +257,7 @@ vertical 3 - + True False @@ -310,21 +310,6 @@ 1 - - - True - False - start - 18 - colorlbl - True - colorsdropdownbtn - - - 0 - 2 - - @@ -339,7 +324,7 @@ 1 - 2 + 1 @@ -352,7 +337,7 @@ 1 - 3 + 2 @@ -366,37 +351,25 @@ 0 - 4 - - - - - True - False - start - - - bitmapdropdown - - - - - 1 - 5 + 3 True False + start + 3 - - Stretched + True - True - False - True - tiledradiobtn + False + start + + + bitmapdropdown + + False @@ -405,13 +378,40 @@ - - Tiled + True - True - False - True - True + False + 3 + + + Stretched + True + True + False + True + tiledradiobtn + + + False + True + 0 + + + + + Tiled + True + True + False + True + True + + + False + True + 1 + + False @@ -422,24 +422,12 @@ 1 - 6 + 3 - - - - - - - - - - - - False -- cgit