cui/source/options/optgdlg.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
New commits: commit 31872a382342060d6e1ecd9168b2a8c7a57d4717 Author: Noel Grandin <n...@peralex.com> AuthorDate: Sat Jan 8 14:20:52 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jan 8 20:44:57 2022 +0100 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.gran...@collabora.co.uk> 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());