cui/inc/strings.hrc | 3 - cui/source/options/appearance.cxx | 19 ------ cui/source/options/appearance.hxx | 1 cui/uiconfig/ui/appearance.ui | 109 ++++++++++++++++---------------------- 4 files changed, 48 insertions(+), 84 deletions(-)
New commits: commit 956a485f941472e9735a1b35fd54d413b2dcf0b0 Author: Sahil Gautam <[email protected]> AuthorDate: Fri Dec 27 02:07:00 2024 +0530 Commit: Sahil Gautam <[email protected]> CommitDate: Mon Jan 26 09:35:39 2026 +0100 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 <[email protected]> Tested-by: Jenkins (cherry picked from commit c007449ec38f49e18ed7d6b8f9ef74c5bd5c015a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198077 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Sahil Gautam <[email protected]> diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 4b8ec0da311d..c38ef4c5e619 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 a0acbc488b53..77a4c01bb931 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)) @@ -534,24 +533,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 size_t nEntry = GetActiveEntry(); const ColorConfigValue& rCurrentEntryColor diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index 7675d54e3bc4..418e5410034d 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -53,7 +53,6 @@ private: std::unique_ptr<weld::RadioButton> m_xAppearanceDark; std::unique_ptr<weld::ComboBox> m_xColorEntryBtn; std::unique_ptr<ColorListBox> m_xColorChangeBtn; - std::unique_ptr<weld::Label> m_xColorLbl; std::unique_ptr<weld::CheckButton> m_xShowInDocumentChkBtn; std::unique_ptr<weld::RadioButton> m_xColorRadioBtn; diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui index d270b0e862f1..abad57bb20fe 100644 --- a/cui/uiconfig/ui/appearance.ui +++ b/cui/uiconfig/ui/appearance.ui @@ -257,7 +257,7 @@ <property name="orientation">vertical</property> <property name="spacing">3</property> <child> - <!-- n-columns=2 n-rows=7 --> + <!-- n-columns=2 n-rows=4 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -310,21 +310,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <object class="GtkLabel" id="colorlbl"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="halign">start</property> - <property name="margin-start">18</property> - <property name="label" translatable="no" context="appearancetabpage|colorlbl">colorlbl</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">colorsdropdownbtn</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> <child> <object class="GtkMenuButton" id="colorsdropdownbtn"> <property name="label" translatable="no" context="appearancetabpage|colorsdropdownbtn"></property> @@ -334,14 +319,13 @@ <property name="receives-default">True</property> <property name="halign">start</property> <property name="draw-indicator">True</property> - <property name="label" translatable="no"></property> <child> <placeholder/> </child> </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">2</property> + <property name="top-attach">1</property> </packing> </child> <child> @@ -354,7 +338,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">3</property> + <property name="top-attach">2</property> </packing> </child> <child> @@ -368,37 +352,25 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="bitmapdropdown"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="halign">start</property> - <child internal-child="accessible"> - <object class="AtkObject" id="bitmapdropdown-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|bitmapdropdown">bitmapdropdown</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">5</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkBox"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="spacing">3</property> <child> - <object class="GtkRadioButton" id="stretchedradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|stretchedradiobtn">Stretched</property> + <object class="GtkComboBoxText" id="bitmapdropdown"> <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - <property name="group">tiledradiobtn</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <child internal-child="accessible"> + <object class="AtkObject" id="bitmapdropdown-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|bitmapdropdown">bitmapdropdown</property> + </object> + </child> </object> <packing> <property name="expand">False</property> @@ -407,13 +379,40 @@ </packing> </child> <child> - <object class="GtkRadioButton" id="tiledradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|tiledradiobtn">Tiled</property> + <object class="GtkBox"> <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="active">True</property> - <property name="draw-indicator">True</property> + <property name="can-focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkRadioButton" id="stretchedradiobtn"> + <property name="label" translatable="yes" context="appearancetabpage|stretchedradiobtn">Stretched</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + <property name="group">tiledradiobtn</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="tiledradiobtn"> + <property name="label" translatable="yes" context="appearancetabpage|tiledradiobtn">Tiled</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="active">True</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -424,24 +423,12 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">6</property> + <property name="top-attach">3</property> </packing> </child> <child> <placeholder/> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property>
