diff --git a/cui/source/dialogs/welcomedlg.cxx b/cui/source/dialogs/welcomedlg.cxx index 742733c547d2..395a16aab82c 100644 --- a/cui/source/dialogs/welcomedlg.cxx +++ b/cui/source/dialogs/welcomedlg.cxx @@ -86,7 +86,7 @@ void WelcomeDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) } else if (rId == sAppearanceTab) { - rPage.getAdditionalProperties().emplace(u"HideAdvancedControls"_ustr, css::uno::Any(true)); + rPage.getAdditionalProperties().emplace(u"IsWelcomeDialog"_ustr, css::uno::Any(true)); } } diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index 969f84019610..32963d342994 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -127,7 +127,8 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage, InitThemes(); InitCustomization(); InitIcons(); - InitDialogs(); + + m_xVerticalToolbars->connect_toggled(LINK(this, SvxAppearanceTabPage, OnTabPosChange)); } void SvxAppearanceTabPage::LoadSchemeList() @@ -206,13 +207,23 @@ bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* rSet */) void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */) { - // hide advanced controls auto& aProperties = getAdditionalProperties(); - auto aIterator = aProperties.find(u"HideAdvancedControls"_ustr); + auto aIterator = aProperties.find(u"IsWelcomeDialog"_ustr); if (aIterator != aProperties.end()) { + // hide advanced controls m_xSizeGrid->set_visible(false); m_xCustomizationFrame->set_visible(false); + + // default to vertical avoiding to check UseVerticalNotebookbar + m_xVerticalToolbars->set_active(true); + } + else + { + if (officecfg::Office::Common::Misc::UseVerticalNotebookbar::get()) + m_xVerticalToolbars->set_active(true); + else + m_xHorizontalToolbars->set_active(true); } // reset scheme list @@ -567,16 +578,6 @@ void SvxAppearanceTabPage::InitIcons() m_xIconsDropDown->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); } -void SvxAppearanceTabPage::InitDialogs() -{ - if (officecfg::Office::Common::Misc::UseVerticalNotebookbar::get()) - m_xVerticalToolbars->set_active(true); - else - m_xHorizontalToolbars->set_active(true); - - m_xVerticalToolbars->connect_toggled(LINK(this, SvxAppearanceTabPage, OnTabPosChange)); -} - IMPL_LINK_NOARG(SvxAppearanceTabPage, OnTabPosChange, weld::Toggleable&, void) { std::shared_ptr xChanges( diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index 7cbcd7f93ccf..e708bb27b304 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -77,7 +77,6 @@ private: void InitThemes(); void InitCustomization(); void InitIcons(); - void InitDialogs(); void LoadSchemeList();