summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2022-01-08 14:20:52 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-01-10 12:19:44 +0100
commit1b0095f174beae396355753de873b52c86cdc8a3 (patch)
tree25e81eb92e5936e0c8b092bc296839eac0052345
parentfc119ab0eebdfc7675f4664f4e9e204d06403a74 (diff)
fix Options->LibreOffice->View->Visibility->Menu on Windows,
impossible to set to Hide, regression from commit 131759a3db51140c21594308ed99c71aa7aba43a Date: Sun Jul 25 16:21:39 2021 +0200 use officecfg for menu options Change-Id: I5312be2963d15ab85c267ece073e52984b1a34de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128137 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 31872a382342060d6e1ecd9168b2a8c7a57d4717) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128152 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--cui/source/options/optgdlg.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 43b529a82718..e0b0bfdf8c5d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -775,13 +775,8 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
if (m_xMenuIconsLB->get_value_changed_from_saved())
{
- TriState eMenuIcons = m_xMenuIconsLB->get_active() == 0 ?
- TRISTATE_INDET :
- static_cast<TriState>(m_xMenuIconsLB->get_active() - 1);
- // Output cache of current setting as possibly modified by System Theme for older version
- bool bMenuIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
- officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(eMenuIcons == TRISTATE_INDET, xChanges);
- officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(bMenuIcons, xChanges);
+ officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(m_xMenuIconsLB->get_active() == 0, xChanges);
+ officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(m_xMenuIconsLB->get_active() == 2, xChanges);
bModified = true;
bMenuOptModified = true;
bAppearanceChanged = true;
@@ -931,10 +926,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
// WorkingSet
m_xFontShowCB->set_active(officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get());
- bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get();
bool bSystemMenuIcons = officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::get();
- TriState eMenuIcons = bSystemMenuIcons ? TRISTATE_INDET : static_cast<TriState>(bMenuIcons);
- m_xMenuIconsLB->set_active(eMenuIcons == 2 ? 0 : eMenuIcons + 1);
+ bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get();
+ m_xMenuIconsLB->set_active(bSystemMenuIcons ? 0 : (bMenuIcons ? 2 : 1));
m_xMenuIconsLB->save_value();
TriState eContextMenuShortcuts = static_cast<TriState>(officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::get());