diff options
author | Sahil Gautam <sahil.gautam.extern@allotropia.de> | 2024-12-27 02:07:00 +0530 |
---|---|---|
committer | Sahil Gautam <sahil.gautam.extern@allotropia.de> | 2025-01-07 14:15:02 +0100 |
commit | c007449ec38f49e18ed7d6b8f9ef74c5bd5c015a (patch) | |
tree | 13afa69b54504cf5d10f5bb9683750258549b897 | |
parent | 7ef881c76e656ece71cf6d1d472757edf5c1ff44 (diff) |
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 <sahil.gautam.extern@allotropia.de>
Tested-by: Jenkins
-rw-r--r-- | cui/inc/strings.hrc | 3 | ||||
-rw-r--r-- | cui/source/options/appearance.cxx | 19 | ||||
-rw-r--r-- | cui/source/options/appearance.hxx | 1 | ||||
-rw-r--r-- | 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<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 fb47f7663724..453675fa82c4 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> @@ -311,21 +311,6 @@ </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> <property name="visible">True</property> @@ -339,7 +324,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">2</property> + <property name="top-attach">1</property> </packing> </child> <child> @@ -352,7 +337,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">3</property> + <property name="top-attach">2</property> </packing> </child> <child> @@ -366,37 +351,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> @@ -405,13 +378,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> @@ -422,24 +422,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> |