diff options
author | Noel Grandin <noel@peralex.com> | 2022-01-08 14:20:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-08 20:44:57 +0100 |
commit | 31872a382342060d6e1ecd9168b2a8c7a57d4717 (patch) | |
tree | 548b701d5169846b183063e0b4a54d292b80d4bb /cui/source/options/optgdlg.cxx | |
parent | e44b54a847672836253f56feab9d9ed2c11c0bc7 (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>
Diffstat (limited to 'cui/source/options/optgdlg.cxx')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 14 |
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()); |