diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 21 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 1 |
2 files changed, 16 insertions, 6 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 535285b70d90..b1b128a000c6 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -742,23 +742,29 @@ IMPL_LINK_NOARG(OfaViewTabPage, OnUseSkiaToggled, weld::ToggleButton&, void) UpdateSkiaStatus(); } +void OfaViewTabPage::HideSkiaWidgets() +{ + m_xUseSkia->hide(); + m_xForceSkiaRaster->hide(); + m_xSkiaStatusEnabled->hide(); + m_xSkiaStatusDisabled->hide(); +} + void OfaViewTabPage::UpdateSkiaStatus() { - bool skiaHidden = true; #if HAVE_FEATURE_SKIA + bool skiaHidden = true; + // For now Skia is used mainly on Windows, enable the controls there. if (Application::GetToolkitName() == "win") skiaHidden = false; // It can also be used on Linux, but only with the rarely used 'gen' backend. if (Application::GetToolkitName() == "x11") skiaHidden = false; -#endif + if (skiaHidden) { - m_xUseSkia->hide(); - m_xForceSkiaRaster->hide(); - m_xSkiaStatusEnabled->hide(); - m_xSkiaStatusDisabled->hide(); + HideSkiaWidgets(); return; } @@ -770,6 +776,9 @@ void OfaViewTabPage::UpdateSkiaStatus() // FIXME: should really add code to show a 'lock' icon here. m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly()); m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && !officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly()); +#else + HideSkiaWidgets(); +#endif } std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 973260283aaf..93dc5280b98e 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -124,6 +124,7 @@ private: DECL_LINK(OnUseSkiaToggled, weld::ToggleButton&, void); DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); void UpdateSkiaStatus(); + void HideSkiaWidgets(); public: OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); |