cui/source/options/appearance.cxx | 233 +++++++++++++++++++++++++++ cui/source/options/appearance.hxx | 26 +++ cui/source/options/optgdlg.cxx | 186 ---------------------- cui/source/options/optgdlg.hxx | 24 -- cui/uiconfig/ui/appearance.ui | 212 +++++++++++++++++++++++++ cui/uiconfig/ui/optviewpage.ui | 283 ---------------------------------- sw/qa/uitest/options/optionsDialog.py | 4 7 files changed, 472 insertions(+), 496 deletions(-)
New commits: commit c4b3f7a6f9e9f1856b76ed398f5e2cd2d65ea417 Author: Sahil Gautam <[email protected]> AuthorDate: Tue Jun 3 21:09:52 2025 +0530 Commit: Sahil Gautam <[email protected]> CommitDate: Fri Jun 6 01:41:49 2025 +0200 tdf#164970 remove misleading comment Change-Id: I9c0d8625ba998e5b0e272949615120bd0680e7dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186139 Tested-by: Jenkins Reviewed-by: Sahil Gautam <[email protected]> diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index 85344de7931e..3a3568833926 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -380,8 +380,6 @@ IMPL_LINK_NOARG(SvxAppearanceTabPage, SchemeChangeHdl, weld::ComboBox&, void) eMode = AppearanceMode::AUTO; } - // NOTE: LoadScheme must be called after updating the AppearanceMode as LoadScheme calls Lode - // which loads colors based on the current application appearance. MiscSettings::SetAppColorMode(eMode); pColorConfig->LoadScheme(sNewScheme); commit 1125698bd2ae8b209f896b97d10c08df5655a690 Author: Sahil Gautam <[email protected]> AuthorDate: Wed May 28 22:09:57 2025 +0530 Commit: Sahil Gautam <[email protected]> CommitDate: Fri Jun 6 01:41:38 2025 +0200 tdf#164970 move icon appearance controls from view to appearance tab this patch also includes some adjustments in the appearance.ui file which improve the overall look of the ui Change-Id: Ica068979c25ab266ec2ebe307cc69a415851b1af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184708 Tested-by: Jenkins Reviewed-by: Sahil Gautam <[email protected]> Reviewed-by: Heiko Tietze <[email protected]> diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index a4c3a9e69e18..85344de7931e 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -15,6 +15,8 @@ #include <sfx2/objsh.hxx> #include <strings.hrc> #include <svtools/colorcfg.hxx> +#include <svtools/imgdef.hxx> +#include <svtools/miscopt.hxx> #include <svtools/restartdialog.hxx> #include <svx/itemwin.hxx> #include <svx/svxids.hrc> @@ -114,9 +116,16 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage, , m_xUseBmpForAppBack(m_xBuilder->weld_check_button(u"usebmpforappback"_ustr)) , m_xBitmapDropDown(m_xBuilder->weld_combo_box(u"bitmapdropdown"_ustr)) , m_xBitmapDrawTypeDropDown(m_xBuilder->weld_combo_box(u"bitmapdrawtypedropdown"_ustr)) + , m_xIconsDropDown(m_xBuilder->weld_combo_box(u"iconsdropdown"_ustr)) + , m_xMoreIconsBtn(m_xBuilder->weld_button(u"moreicons"_ustr)) + , m_xToolbarIconSize(m_xBuilder->weld_combo_box(u"toolbariconsdropdown"_ustr)) + , m_xSidebarIconSize(m_xBuilder->weld_combo_box(u"sidebariconsdropdown"_ustr)) + , m_xNotebookbarIconSize(m_xBuilder->weld_combo_box(u"notebookbariconsdropdown"_ustr)) + , m_sAutoStr(m_xIconsDropDown->get_text(0)) { InitThemes(); InitCustomization(); + InitIcons(); } void SvxAppearanceTabPage::LoadSchemeList() @@ -201,6 +210,73 @@ void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */) pColorConfig->ClearModified(); pColorConfig->DisableBroadcast(); pColorConfig.reset(new EditableColorConfig); + + bool bEnable = true; + + nInitialToolbarIconSizeSel = 1; + if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_AUTO) + nInitialToolbarIconSizeSel = 0; + else if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE) + nInitialToolbarIconSizeSel = 2; + else if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_32) + nInitialToolbarIconSizeSel = 3; + + bEnable = !officecfg::Office::Common::Misc::SymbolSet::isReadOnly(); + m_xToolbarIconSize->set_active(nInitialToolbarIconSizeSel); + m_xToolbarIconSize->set_sensitive(bEnable); + m_xMoreIconsBtn->set_sensitive(bEnable); + m_xToolbarIconSize->save_value(); + + ToolBoxButtonSize eSidebarIconSize + = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::SidebarIconSize::get()); + if (eSidebarIconSize == ToolBoxButtonSize::DontCare) + nInitialSidebarIconSizeSel = 0; + else if (eSidebarIconSize == ToolBoxButtonSize::Small) + nInitialSidebarIconSizeSel = 1; + else if (eSidebarIconSize == ToolBoxButtonSize::Large) + nInitialSidebarIconSizeSel = 2; + + bEnable = !officecfg::Office::Common::Misc::SidebarIconSize::isReadOnly(); + m_xSidebarIconSize->set_active(nInitialSidebarIconSizeSel); + m_xSidebarIconSize->set_sensitive(bEnable); + m_xSidebarIconSize->save_value(); + + ToolBoxButtonSize eNotebookbarIconSize = static_cast<ToolBoxButtonSize>( + officecfg::Office::Common::Misc::NotebookbarIconSize::get()); + if (eNotebookbarIconSize == ToolBoxButtonSize::DontCare) + nInitialNotebookbarIconSizeSel = 0; + else if (eNotebookbarIconSize == ToolBoxButtonSize::Small) + nInitialNotebookbarIconSizeSel = 1; + else if (eNotebookbarIconSize == ToolBoxButtonSize::Large) + nInitialNotebookbarIconSizeSel = 2; + + bEnable = !officecfg::Office::Common::Misc::NotebookbarIconSize::isReadOnly(); + m_xNotebookbarIconSize->set_active(nInitialNotebookbarIconSizeSel); + m_xNotebookbarIconSize->set_sensitive(bEnable); + m_xNotebookbarIconSize->save_value(); + + // tdf#153497 set name of automatic icon theme, it may have changed due to "Apply" while this page is visible + // TODO: the automatic icon theme changes based on the application appearance mode. + // this doesn't work properly because appearance changes need a restart to properly + // reflect. it would be fixed in a follow up patch which removes the restart dialog + // and implements hot reloading. + InitIcons(); + + SvtMiscOptions aMiscOptions; + if (aMiscOptions.IconThemeWasSetAutomatically()) + nInitialIconThemeSel = 0; + else + { + const OUString selected = SvtMiscOptions::GetIconTheme(); + const vcl::IconThemeInfo& selectedInfo + = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, selected); + nInitialIconThemeSel = m_xIconsDropDown->find_text(selectedInfo.GetDisplayName()); + } + + bEnable = !officecfg::Office::Common::Misc::SymbolStyle::isReadOnly(); + m_xIconsDropDown->set_active(nInitialIconThemeSel); + m_xIconsDropDown->set_sensitive(bEnable); + m_xIconsDropDown->save_value(); } IMPL_LINK_NOARG(SvxAppearanceTabPage, ShowInDocumentHdl, weld::Toggleable&, void) @@ -447,6 +523,161 @@ void SvxAppearanceTabPage::InitCustomization() m_xShowInDocumentChkBtn->hide(); } +static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, + const vcl::IconThemeInfo& rInfo2) +{ + return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0; +} + +void SvxAppearanceTabPage::InitIcons() +{ + // callbacks + m_xMoreIconsBtn->connect_clicked(LINK(this, SvxAppearanceTabPage, OnMoreIconsClick)); + m_xIconsDropDown->connect_changed(LINK(this, SvxAppearanceTabPage, OnIconThemeChange)); + m_xToolbarIconSize->connect_changed(LINK(this, SvxAppearanceTabPage, OnToolbarIconSizeChange)); + m_xSidebarIconSize->connect_changed(LINK(this, SvxAppearanceTabPage, OnSidebarIconSizeChange)); + m_xNotebookbarIconSize->connect_changed( + LINK(this, SvxAppearanceTabPage, OnNotebookbarIconSizeChange)); + + // Set known icon themes + m_xIconsDropDown->clear(); + StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings(); + mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes(); + std::sort(mInstalledIconThemes.begin(), mInstalledIconThemes.end(), DisplayNameCompareLessThan); + + // Start with the automatically chosen icon theme + OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme(); + const vcl::IconThemeInfo& autoIconTheme + = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); + + OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; + m_xIconsDropDown->append(u"auto"_ustr, + entryForAuto); // index 0 means choose style automatically + + // separate auto and other icon themes + m_xIconsDropDown->append_separator(u""_ustr); + + for (auto const& installIconTheme : mInstalledIconThemes) + m_xIconsDropDown->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); +} + +IMPL_LINK_NOARG(SvxAppearanceTabPage, OnIconThemeChange, weld::ComboBox&, void) +{ + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + + SvtMiscOptions aMiscOptions; + const sal_Int32 nStyleLB_NewSelection = m_xIconsDropDown->get_active(); + if (nInitialIconThemeSel != nStyleLB_NewSelection) + { + aMiscOptions.SetIconTheme(m_xIconsDropDown->get_active_id()); + nInitialIconThemeSel = nStyleLB_NewSelection; + } + + xChanges->commit(); +} + +IMPL_LINK_NOARG(SvxAppearanceTabPage, OnToolbarIconSizeChange, weld::ComboBox&, void) +{ + SvtMiscOptions aMiscOptions; + const sal_Int32 nToolbarIconSizeSel = m_xToolbarIconSize->get_active(); + if (nInitialToolbarIconSizeSel != nToolbarIconSizeSel) + { + sal_Int16 eSet = SFX_SYMBOLS_SIZE_AUTO; + switch (nToolbarIconSizeSel) + { + case 0: + eSet = SFX_SYMBOLS_SIZE_AUTO; + break; + case 1: + eSet = SFX_SYMBOLS_SIZE_SMALL; + break; + case 2: + eSet = SFX_SYMBOLS_SIZE_LARGE; + break; + case 3: + eSet = SFX_SYMBOLS_SIZE_32; + break; + default: + SAL_WARN("cui.options", + "SvxAppearanceTabPage::OnToolbarIconSizeChange(): This state of " + "m_xToolbarIcons should not be possible!"); + } + aMiscOptions.SetSymbolsSize(eSet); + } +} + +IMPL_LINK_NOARG(SvxAppearanceTabPage, OnSidebarIconSizeChange, weld::ComboBox&, void) +{ + const sal_Int32 nSidebarIconSizeNewSel = m_xSidebarIconSize->get_active(); + if (nInitialSidebarIconSizeSel != nSidebarIconSizeNewSel) + { + ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare; + switch (nSidebarIconSizeNewSel) + { + case 0: + eSet = ToolBoxButtonSize::DontCare; + break; + case 1: + eSet = ToolBoxButtonSize::Small; + break; + case 2: + eSet = ToolBoxButtonSize::Large; + break; + default: + SAL_WARN("cui.options", + "SvxAppearanceTabPage::OnSidebarIconSizeChange(): This state of " + "m_xSidebarIconSize should not be possible!"); + } + + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + + officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast<sal_Int16>(eSet), + xChanges); + xChanges->commit(); + } +} + +IMPL_LINK_NOARG(SvxAppearanceTabPage, OnNotebookbarIconSizeChange, weld::ComboBox&, void) +{ + const sal_Int32 nNotebookbarSizeLB_NewSelection = m_xNotebookbarIconSize->get_active(); + if (nInitialNotebookbarIconSizeSel != nNotebookbarSizeLB_NewSelection) + { + ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare; + switch (nNotebookbarSizeLB_NewSelection) + { + case 0: + eSet = ToolBoxButtonSize::DontCare; + break; + case 1: + eSet = ToolBoxButtonSize::Small; + break; + case 2: + eSet = ToolBoxButtonSize::Large; + break; + default: + SAL_WARN("cui.options", + "SvxAppearanceTabPage::OnNotebookbarIconSizeChange(): This state of " + "m_xNotebookbarIconSizeLB should not be possible!"); + } + + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + + officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast<sal_Int16>(eSet), + xChanges); + xChanges->commit(); + } +} + +IMPL_STATIC_LINK_NOARG(SvxAppearanceTabPage, OnMoreIconsClick, weld::Button&, void) +{ + css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue( + u"AdditionsTag"_ustr, u"Icons"_ustr) }; + comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); +} + void SvxAppearanceTabPage::UpdateColorDropdown() { ColorConfigEntry nEntry = GetActiveEntry(); diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index 0cdad8ee81e8..fbab0c1b4a88 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -15,6 +15,11 @@ #include <svx/xflasit.hxx> #include <svx/svxdlg.hxx> #include <svtools/colorcfg.hxx> +#include <sfx2/app.hxx> +#include <vcl/graph.hxx> +#include <vcl/IconThemeInfo.hxx> +#include <vcl/ptrstyle.hxx> +#include <vcl/svapp.hxx> using namespace svtools; class SvxAppearanceTabPage : public SfxTabPage @@ -36,6 +41,20 @@ private: std::unique_ptr<weld::ComboBox> m_xBitmapDropDown; std::unique_ptr<weld::ComboBox> m_xBitmapDrawTypeDropDown; + std::vector<vcl::IconThemeInfo> mInstalledIconThemes; + + std::unique_ptr<weld::ComboBox> m_xIconsDropDown; + std::unique_ptr<weld::Button> m_xMoreIconsBtn; + std::unique_ptr<weld::ComboBox> m_xToolbarIconSize; + std::unique_ptr<weld::ComboBox> m_xSidebarIconSize; + std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSize; + OUString m_sAutoStr; + + sal_Int32 nInitialToolbarIconSizeSel; + sal_Int32 nInitialSidebarIconSizeSel; + sal_Int32 nInitialNotebookbarIconSizeSel; + sal_Int32 nInitialIconThemeSel; + DECL_LINK(ColorEntryChgHdl, weld::ComboBox&, void); DECL_LINK(ColorValueChgHdl, ColorListBox&, void); DECL_LINK(ShowInDocumentHdl, weld::Toggleable&, void); @@ -50,8 +69,15 @@ private: DECL_LINK(BitmapDrawTypeDropDownHdl, weld::ComboBox&, void); DECL_LINK(UseBmpForAppBackHdl, weld::Toggleable&, void); + DECL_LINK(OnIconThemeChange, weld::ComboBox&, void); + DECL_STATIC_LINK(SvxAppearanceTabPage, OnMoreIconsClick, weld::Button&, void); + DECL_LINK(OnToolbarIconSizeChange, weld::ComboBox&, void); + DECL_LINK(OnSidebarIconSizeChange, weld::ComboBox&, void); + DECL_LINK(OnNotebookbarIconSizeChange, weld::ComboBox&, void); + void InitThemes(); void InitCustomization(); + void InitIcons(); void LoadSchemeList(); void UpdateBmpControlsState(); diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 235f07074e17..92afa68ccfa4 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -34,7 +34,6 @@ #include <svl/languageoptions.hxx> #include <svl/cjkoptions.hxx> #include <svl/ctloptions.hxx> -#include <svtools/miscopt.hxx> #include <unotools/syslocaleoptions.hxx> #include <sfx2/objsh.hxx> #include <comphelper/propertysequence.hxx> @@ -522,30 +521,9 @@ bool CanvasSettings::IsHardwareAccelerationAvailable() const // class OfaViewTabPage -------------------------------------------------- -static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, const vcl::IconThemeInfo& rInfo2) -{ - return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0; -} - OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, u"cui/ui/optviewpage.ui"_ustr, u"OptViewPage"_ustr, &rSet) - , nSizeLB_InitialSelection(0) - , nSidebarSizeLB_InitialSelection(0) - , nNotebookbarSizeLB_InitialSelection(0) - , nStyleLB_InitialSelection(0) , pCanvasSettings(new CanvasSettings) - , m_xIconSizeLabel(m_xBuilder->weld_label(u"label14"_ustr)) - , m_xIconSizeLB(m_xBuilder->weld_combo_box(u"iconsize"_ustr)) - , m_xIconSizeImg(m_xBuilder->weld_widget(u"lockiconsize"_ustr)) - , m_xSidebarIconSizeLabel(m_xBuilder->weld_label(u"label9"_ustr)) - , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box(u"sidebariconsize"_ustr)) - , m_xSidebarIconSizeImg(m_xBuilder->weld_widget(u"locksidebariconsize"_ustr)) - , m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label(u"label8"_ustr)) - , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box(u"notebookbariconsize"_ustr)) - , m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget(u"locknotebookbariconsize"_ustr)) - , m_xIconStyleLabel(m_xBuilder->weld_label(u"label6"_ustr)) - , m_xIconStyleLB(m_xBuilder->weld_combo_box(u"iconstyle"_ustr)) - , m_xIconStyleImg(m_xBuilder->weld_widget(u"lockiconstyle"_ustr)) , m_xFontAntiAliasing(m_xBuilder->weld_check_button(u"aafont"_ustr)) , m_xFontAntiAliasingImg(m_xBuilder->weld_widget(u"lockaafont"_ustr)) , m_xAAPointLimitLabel(m_xBuilder->weld_label(u"aafrom"_ustr)) @@ -567,20 +545,13 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xMouseMiddleLabel(m_xBuilder->weld_label(u"label12"_ustr)) , m_xMouseMiddleLB(m_xBuilder->weld_combo_box(u"mousemiddle"_ustr)) , m_xMouseMiddleImg(m_xBuilder->weld_widget(u"lockmousemiddle"_ustr)) - , m_xMoreIcons(m_xBuilder->weld_button(u"btnMoreIcons"_ustr)) , m_xRunGPTests(m_xBuilder->weld_button(u"btn_rungptest"_ustr)) - , m_sAutoStr(m_xIconStyleLB->get_text(0)) { m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) ); m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled)); m_xSkiaLog->connect_clicked(LINK(this, OfaViewTabPage, OnCopySkiaLog)); - UpdateIconThemes(); - - m_xIconStyleLB->set_active(0); - - m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); m_xRunGPTests->connect_clicked(LINK(this, OfaViewTabPage, OnRunGPTestClick)); // Hide "Run Graphics Test" button if Experimental Mode is off @@ -588,28 +559,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xRunGPTests->hide(); } -void OfaViewTabPage::UpdateIconThemes() -{ - // Set known icon themes - m_xIconStyleLB->clear(); - StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings(); - mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes(); - std::sort(mInstalledIconThemes.begin(), mInstalledIconThemes.end(), DisplayNameCompareLessThan); - - // Start with the automatically chosen icon theme - OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme(); - const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); - - OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; - m_xIconStyleLB->append(u"auto"_ustr, entryForAuto); // index 0 means choose style automatically - - // separate auto and other icon themes - m_xIconStyleLB->append_separator(u""_ustr); - - for (auto const& installIconTheme : mInstalledIconThemes) - m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); -} - OfaViewTabPage::~OfaViewTabPage() { } @@ -620,13 +569,6 @@ IMPL_LINK_NOARG(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void) m_xGraphicsTestDialog.run(); } -IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void) -{ - css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue( - u"AdditionsTag"_ustr, u"Icons"_ustr) }; - comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); -} - IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::Toggleable&, void ) { bool bAAEnabled = m_xFontAntiAliasing->get_active() && !officecfg::Office::Common::View::FontAntiAliasing::MinPixelHeight::isReadOnly(); @@ -737,64 +679,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) { bool bModified = false; bool bRepaintWindows(false); - std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); - - SvtMiscOptions aMiscOptions; - const sal_Int32 nSizeLB_NewSelection = m_xIconSizeLB->get_active(); - if( nSizeLB_InitialSelection != nSizeLB_NewSelection ) - { - // from now on it's modified, even if via auto setting the same size was set as now selected in the LB - sal_Int16 eSet = SFX_SYMBOLS_SIZE_AUTO; - switch( nSizeLB_NewSelection ) - { - case 0: eSet = SFX_SYMBOLS_SIZE_AUTO; break; - case 1: eSet = SFX_SYMBOLS_SIZE_SMALL; break; - case 2: eSet = SFX_SYMBOLS_SIZE_LARGE; break; - case 3: eSet = SFX_SYMBOLS_SIZE_32; break; - default: - SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This state of m_xIconSizeLB should not be possible!"); - } - aMiscOptions.SetSymbolsSize( eSet ); - } - - const sal_Int32 nSidebarSizeLB_NewSelection = m_xSidebarIconSizeLB->get_active(); - if( nSidebarSizeLB_InitialSelection != nSidebarSizeLB_NewSelection ) - { - // from now on it's modified, even if via auto setting the same size was set as now selected in the LB - ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare; - switch( nSidebarSizeLB_NewSelection ) - { - case 0: eSet = ToolBoxButtonSize::DontCare; break; - case 1: eSet = ToolBoxButtonSize::Small; break; - case 2: eSet = ToolBoxButtonSize::Large; break; - default: - SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This state of m_xSidebarIconSizeLB should not be possible!"); - } - officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast<sal_Int16>(eSet), xChanges); - } - - const sal_Int32 nNotebookbarSizeLB_NewSelection = m_xNotebookbarIconSizeLB->get_active(); - if( nNotebookbarSizeLB_InitialSelection != nNotebookbarSizeLB_NewSelection ) - { - // from now on it's modified, even if via auto setting the same size was set as now selected in the LB - ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare; - switch( nNotebookbarSizeLB_NewSelection ) - { - case 0: eSet = ToolBoxButtonSize::DontCare; break; - case 1: eSet = ToolBoxButtonSize::Small; break; - case 2: eSet = ToolBoxButtonSize::Large; break; - default: - SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This state of m_xNotebookbarIconSizeLB should not be possible!"); - } - officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast<sal_Int16>(eSet), xChanges); - } - - const sal_Int32 nStyleLB_NewSelection = m_xIconStyleLB->get_active(); - if( nStyleLB_InitialSelection != nStyleLB_NewSelection ) - { - aMiscOptions.SetIconTheme(m_xIconStyleLB->get_active_id()); - nStyleLB_InitialSelection = nStyleLB_NewSelection; - } bool bAppearanceChanged = false; std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); @@ -825,6 +709,8 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) bAppearanceChanged = true; } + std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); + if (m_xFontShowCB->get_state_changed_from_saved()) { officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(m_xFontShowCB->get_active(), xChanges); @@ -894,76 +780,8 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) void OfaViewTabPage::Reset( const SfxItemSet* ) { - SvtMiscOptions aMiscOptions; bool bEnable = true; - if (SvtMiscOptions::GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO) - { - nSizeLB_InitialSelection = 1; - - if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE) - nSizeLB_InitialSelection = 2; - else if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_32) - nSizeLB_InitialSelection = 3; - } - bEnable = !officecfg::Office::Common::Misc::SymbolSet::isReadOnly(); - m_xIconSizeLB->set_active( nSizeLB_InitialSelection ); - m_xIconSizeLabel->set_sensitive(bEnable); - m_xIconSizeLB->set_sensitive(bEnable); - m_xMoreIcons->set_sensitive(bEnable); - m_xIconSizeImg->set_visible(!bEnable); - m_xIconSizeLB->save_value(); - - ToolBoxButtonSize eSidebarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::SidebarIconSize::get()); - if( eSidebarIconSize == ToolBoxButtonSize::DontCare ) - ; // do nothing - else if( eSidebarIconSize == ToolBoxButtonSize::Small ) - nSidebarSizeLB_InitialSelection = 1; - else if( eSidebarIconSize == ToolBoxButtonSize::Large ) - nSidebarSizeLB_InitialSelection = 2; - - bEnable = !officecfg::Office::Common::Misc::SidebarIconSize::isReadOnly(); - m_xSidebarIconSizeLB->set_active( nSidebarSizeLB_InitialSelection ); - m_xSidebarIconSizeLabel->set_sensitive(bEnable); - m_xSidebarIconSizeLB->set_sensitive(bEnable); - m_xSidebarIconSizeImg->set_visible(!bEnable); - m_xSidebarIconSizeLB->save_value(); - - ToolBoxButtonSize eNotebookbarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::NotebookbarIconSize::get()); - if( eNotebookbarIconSize == ToolBoxButtonSize::DontCare ) - ; // do nothing - else if( eNotebookbarIconSize == ToolBoxButtonSize::Small ) - nNotebookbarSizeLB_InitialSelection = 1; - else if( eNotebookbarIconSize == ToolBoxButtonSize::Large ) - nNotebookbarSizeLB_InitialSelection = 2; - - bEnable = !officecfg::Office::Common::Misc::NotebookbarIconSize::isReadOnly(); - m_xNotebookbarIconSizeLB->set_active(nNotebookbarSizeLB_InitialSelection); - m_xNotebookbarIconSizeLabel->set_sensitive(bEnable); - m_xNotebookbarIconSizeLB->set_sensitive(bEnable); - m_xNotebookbarIconSizeImg->set_visible(!bEnable); - m_xNotebookbarIconSizeLB->save_value(); - - // tdf#153497 set name of automatic icon theme, it may have changed due to "Apply" while this page is visible - UpdateIconThemes(); - - if (aMiscOptions.IconThemeWasSetAutomatically()) { - nStyleLB_InitialSelection = 0; - } - else { - const OUString selected = SvtMiscOptions::GetIconTheme(); - const vcl::IconThemeInfo& selectedInfo = - vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, selected); - nStyleLB_InitialSelection = m_xIconStyleLB->find_text(selectedInfo.GetDisplayName()); - } - - bEnable = !officecfg::Office::Common::Misc::SymbolStyle::isReadOnly(); - m_xIconStyleLB->set_active(nStyleLB_InitialSelection); - m_xIconStyleLabel->set_sensitive(bEnable); - m_xIconStyleLB->set_sensitive(bEnable); - m_xIconStyleImg->set_visible(!bEnable); - m_xIconStyleLB->save_value(); - // Middle Mouse Button bEnable = !officecfg::Office::Common::View::Dialog::MiddleMouseButton::isReadOnly(); sal_Int16 nMiddleMouseButton = officecfg::Office::Common::View::Dialog::MiddleMouseButton::get(); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 572e273f4c83..7b4c006393e7 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -86,28 +86,8 @@ public: class OfaViewTabPage : public SfxTabPage { private: - sal_Int32 nSizeLB_InitialSelection; - sal_Int32 nSidebarSizeLB_InitialSelection; - sal_Int32 nNotebookbarSizeLB_InitialSelection; - sal_Int32 nStyleLB_InitialSelection; - std::unique_ptr<CanvasSettings> pCanvasSettings; - std::vector<vcl::IconThemeInfo> mInstalledIconThemes; - - std::unique_ptr<weld::Label> m_xIconSizeLabel; - std::unique_ptr<weld::ComboBox> m_xIconSizeLB; - std::unique_ptr<weld::Widget> m_xIconSizeImg; - std::unique_ptr<weld::Label> m_xSidebarIconSizeLabel; - std::unique_ptr<weld::ComboBox> m_xSidebarIconSizeLB; - std::unique_ptr<weld::Widget> m_xSidebarIconSizeImg; - std::unique_ptr<weld::Label> m_xNotebookbarIconSizeLabel; - std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSizeLB; - std::unique_ptr<weld::Widget> m_xNotebookbarIconSizeImg; - std::unique_ptr<weld::Label> m_xIconStyleLabel; - std::unique_ptr<weld::ComboBox> m_xIconStyleLB; - std::unique_ptr<weld::Widget> m_xIconStyleImg; - std::unique_ptr<weld::CheckButton> m_xFontAntiAliasing; std::unique_ptr<weld::Widget> m_xFontAntiAliasingImg; std::unique_ptr<weld::Label> m_xAAPointLimitLabel; @@ -133,15 +113,11 @@ private: std::unique_ptr<weld::Label> m_xMouseMiddleLabel; std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB; std::unique_ptr<weld::Widget> m_xMouseMiddleImg; - std::unique_ptr<weld::Button> m_xMoreIcons; std::unique_ptr<weld::Button> m_xRunGPTests; - OUString m_sAutoStr; - DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void); DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void); DECL_LINK(OnCopySkiaLog, weld::Button&, void); - DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); DECL_LINK(OnRunGPTestClick, weld::Button&, void); void UpdateSkiaStatus(); void HideSkiaWidgets(); diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui index e1964bde8c17..8e5e9a52136e 100644 --- a/cui/uiconfig/ui/appearance.ui +++ b/cui/uiconfig/ui/appearance.ui @@ -2,6 +2,11 @@ <!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> + <object class="GtkImage" id="moreicons_image"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">cmd/sc_additionsdialog.png</property> + </object> <object class="GtkImage" id="morethemes_image"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -40,7 +45,7 @@ <object class="GtkBox"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="halign">start</property> + <property name="hexpand">True</property> <property name="spacing">3</property> <child> <object class="GtkComboBoxText" id="scheme"> @@ -337,10 +342,213 @@ </child> </object> <packing> - <property name="expand">True</property> + <property name="expand">False</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkComboBoxText" id="iconsdropdown"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <items> + <item translatable="yes" context="appearance|iconsdropdown">Automatic</item> + <item translatable="yes" context="appearance|iconsdropdown">Sifr</item> + <item translatable="yes" context="appearance|iconsdropdown">Breeze</item> + </items> + <child internal-child="accessible"> + <object class="AtkObject" id="iconsdropdown-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|iconsdropdown">Select an icon theme for the application.</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="moreicons"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="optappearancepage|moreicons">Add more icons.</property> + <property name="halign">start</property> + <property name="image">moreicons_image</property> + <property name="always-show-image">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="moreicons-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|moreicons">Click to select and download more icons from the extensions website.</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <!-- n-columns=2 n-rows=3 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="valign">start</property> + <property name="vexpand">False</property> + <property name="row-spacing">3</property> + <property name="column-spacing">3</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="apperance|toolbariconsizelbl">Toolbar</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="appearance|sidebariconsizelbl">Sidebar</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="apperance|notebookbariconsizelbl">Notebookbar</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="toolbariconsdropdown"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <items> + <item translatable="yes" context="appearance|toolbariconsdropdown">Automatic</item> + <item translatable="yes" context="appearance|toolbariconsdropdown">Small</item> + <item translatable="yes" context="appearance|toolbariconsdropdown">Large</item> + <item translatable="yes" context="appearance|toolbariconsdropdown">Extra Large</item> + </items> + <child internal-child="accessible"> + <object class="AtkObject" id="toolbariconsdropdown-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|toolbariconsdropdown">Select the icon theme for the toolbar.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="sidebariconsdropdown"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <items> + <item translatable="yes" context="appearance|sidebariconsdropdown">Automatic</item> + <item translatable="yes" context="appearance|sidebariconsdropdown">Small</item> + <item translatable="yes" context="appearance|sidebariconsdropdown">Large</item> + </items> + <child internal-child="accessible"> + <object class="AtkObject" id="sidebariconsdropdown-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|sidebariconsdropdown">Select the icon theme for the sidebar.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="notebookbariconsdropdown"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <items> + <item translatable="yes" context="appearance|notebookbariconsdropdown">Automatic</item> + <item translatable="yes" context="appearance|notebookbariconsdropdown">Small</item> + <item translatable="yes" context="appearance|notebookbariconsdropdown">Large</item> + </items> + <child internal-child="accessible"> + <object class="AtkObject" id="notebookbariconsdropdown-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|notebookbariconsdropdown">Select the icon theme for the notebookbar.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="iconslbl"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="appearance|iconslbl">Icons</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + <child internal-child="accessible"> + <object class="AtkObject" id="iconslbl-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|iconslbl">Controls to change icon theme and sizes for various user interfaces.</property> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> </interface> diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui index d17e21947a5b..d40bd2a91c11 100644 --- a/cui/uiconfig/ui/optviewpage.ui +++ b/cui/uiconfig/ui/optviewpage.ui @@ -9,11 +9,6 @@ <property name="step-increment">1</property> <property name="page-increment">10</property> </object> - <object class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="icon-name">cmd/sc_additionsdialog.png</property> - </object> <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="OptViewPage"> <property name="visible">True</property> @@ -23,7 +18,7 @@ <property name="border-width">6</property> <property name="column-spacing">24</property> <child> - <!-- n-columns=1 n-rows=3 --> + <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -106,282 +101,6 @@ </object> </child> </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame6"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <property name="label-xalign">0</property> - <property name="shadow-type">none</property> - <child> - <!-- n-columns=3 n-rows=3 --> - <object class="GtkGrid" id="refgrid1"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> - <property name="hexpand">True</property> - <property name="row-spacing">3</property> - <property name="column-spacing">6</property> - <child> - <object class="GtkComboBoxText" id="notebookbariconsize"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="optviewpage|notebookbariconsize">Automatic</item> - <item translatable="yes" context="optviewpage|notebookbariconsize">Small</item> - <item translatable="yes" context="optviewpage|notebookbariconsize">Large</item> - </items> - <child internal-child="accessible"> - <object class="AtkObject" id="notebookbariconsize-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | notebookbariconsize">Specifies the display size of notebook bar icons.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">2</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label7">_Notebookbar:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">notebookbariconsize</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="sidebariconsize"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="optviewpage|sidebariconsize">Automatic</item> - <item translatable="yes" context="optviewpage|sidebariconsize">Small</item> - <item translatable="yes" context="optviewpage|sidebariconsize">Large</item> - </items> - <child internal-child="accessible"> - <object class="AtkObject" id="sidebariconsize-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | sidebariconsize">Specifies the display size of sidebar icons.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">2</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label9">Sidebar:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">sidebariconsize</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="iconsize"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="optviewpage|iconsize">Automatic</item> - <item translatable="yes" context="optviewpage|iconsize">Small</item> - <item translatable="yes" context="optviewpage|iconsize">Large</item> - <item translatable="yes" context="optviewpage|iconsize">Extra Large</item> - </items> - <child internal-child="accessible"> - <object class="AtkObject" id="iconsize-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | iconsize">Specifies the display size of toolbar icons.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">2</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label8">Toolbar:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">iconsize</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkImage" id="lockiconsize"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkImage" id="locknotebookbariconsize"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkImage" id="locksidebariconsize"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label1">Icon Size</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <property name="label-xalign">0</property> - <property name="shadow-type">none</property> - <child> - <!-- n-columns=4 n-rows=1 --> - <object class="GtkGrid" id="refgrid"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> - <property name="hexpand">True</property> - <property name="column-spacing">6</property> - <child> - <object class="GtkComboBoxText" id="iconstyle"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="optviewpage|iconstyle">Automatic</item> - <item translatable="yes" context="optviewpage|iconstyle">Sifr</item> - <item translatable="yes" context="optviewpage|iconstyle">Breeze</item> - </items> - <child internal-child="accessible"> - <object class="AtkObject" id="iconstyle-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | iconstyle">Specifies the icon style for icons in toolbars and dialogs.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">2</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label6">_Theme:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">iconstyle</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="btnMoreIcons"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="tooltip-text" translatable="yes" context="optviewpage|btnMoreIcons">Add more icon themes via extension</property> - <property name="image">image1</property> - <property name="always-show-image">True</property> - </object> - <packing> - <property name="left-attach">3</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkImage" id="lockiconstyle"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="optviewpage|label1">Icon Theme</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> <packing> <property name="left-attach">0</property> <property name="top-attach">0</property> diff --git a/sw/qa/uitest/options/optionsDialog.py b/sw/qa/uitest/options/optionsDialog.py index b59180c53c2a..9a628287bd5a 100644 --- a/sw/qa/uitest/options/optionsDialog.py +++ b/sw/qa/uitest/options/optionsDialog.py @@ -19,10 +19,10 @@ class optionsDialog(UITestCase): xPages = xDialog.getChild("pages") xLOEntry = xPages.getChild('0') xLOEntry.executeAction("EXPAND", tuple()) - xViewEntry = xLOEntry.getChild('2') + xViewEntry = xLOEntry.getChild('7') xViewEntry.executeAction("SELECT", tuple()) - xMoreIconsBtn = xDialog.getChild("btnMoreIcons") + xMoreIconsBtn = xDialog.getChild("moreicons") with self.ui_test.execute_blocking_action(xMoreIconsBtn.executeAction, args=('CLICK', ()), close_button="buttonClose") as dialog: # Check it doesn't crash while opening it
