diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-10-25 16:03:14 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-10-26 09:23:06 +0200 |
commit | 916ea4b0aadc61c2fdb89ac18e3e8327406bcd37 (patch) | |
tree | b4145c1275062fa084096d4b3669452e348b464c /cui/source | |
parent | ee368cc3f97886b9574e22fdf8a15c8225e785d5 (diff) |
tdf#157846 - UI: Part 9 - Unify lockdown behavior of Options dialog
for Accessibility Page.
Change-Id: I4705904200715c1e41849a47a3dd684ddfa219c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158425
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optaccessibility.cxx | 38 | ||||
-rw-r--r-- | cui/source/options/optaccessibility.hxx | 7 |
2 files changed, 39 insertions, 6 deletions
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index f81c893673ca..008a4a273502 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -27,11 +27,18 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container* : SfxTabPage(pPage, pController, "cui/ui/optaccessibilitypage.ui", "OptAccessibilityPage", &rSet) , m_xAccessibilityTool(m_xBuilder->weld_check_button("acctool")) , m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly")) + , m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget("locktextselinreadonly")) , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics")) + , m_xAnimatedGraphicsImg(m_xBuilder->weld_widget("lockanimatedgraphics")) , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext")) + , m_xAnimatedTextsImg(m_xBuilder->weld_widget("lockanimatedtext")) , m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast")) + , m_xHighContrastImg(m_xBuilder->weld_widget("lockhighcontrast")) + , m_xHighContrastLabel(m_xBuilder->weld_label("label13")) , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor")) + , m_xAutomaticFontColorImg(m_xBuilder->weld_widget("lockautofontcolor")) , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor")) + , m_xPagePreviewsImg(m_xBuilder->weld_widget("locksystempagepreviewcolor")) { #ifdef UNX // UNIX: read the gconf2 setting instead to use the checkbox @@ -103,28 +110,47 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* ) void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* ) { m_xPagePreviews->set_active( officecfg::Office::Common::Accessibility::IsForPagePreviews::get() ); - if( officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly()) + { m_xPagePreviews->set_sensitive(false); + m_xPagePreviewsImg->set_visible(true); + } m_xAnimatedGraphics->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get() ); - if( officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly()) + { m_xAnimatedGraphics->set_sensitive(false); + m_xAnimatedGraphicsImg->set_visible(true); + } m_xAnimatedTexts->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get() ); - if( officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly()) + { m_xAnimatedTexts->set_sensitive(false); + m_xAnimatedTextsImg->set_visible(true); + } m_xAutomaticFontColor->set_active( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ); - if( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly()) + { m_xAutomaticFontColor->set_sensitive(false); + m_xAutomaticFontColorImg->set_visible(true); + } m_xTextSelectionInReadonly->set_active( officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get() ); - if( officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly()) + { m_xTextSelectionInReadonly->set_sensitive(false); + m_xTextSelectionInReadonlyImg->set_visible(true); + } m_xHighContrast->set_active( officecfg::Office::Common::Accessibility::HighContrast::get() ); - if( officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() ) + if (officecfg::Office::Common::Accessibility::HighContrast::isReadOnly()) + { m_xHighContrast->set_sensitive(false); + m_xHighContrastLabel->set_sensitive(false); + m_xHighContrastImg->set_visible(true); + } AllSettings aAllSettings = Application::GetSettings(); const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings(); diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx index 4481dd8993af..73fe167c1679 100644 --- a/cui/source/options/optaccessibility.hxx +++ b/cui/source/options/optaccessibility.hxx @@ -24,11 +24,18 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage { std::unique_ptr<weld::CheckButton> m_xAccessibilityTool; std::unique_ptr<weld::CheckButton> m_xTextSelectionInReadonly; + std::unique_ptr<weld::Widget> m_xTextSelectionInReadonlyImg; std::unique_ptr<weld::CheckButton> m_xAnimatedGraphics; + std::unique_ptr<weld::Widget> m_xAnimatedGraphicsImg; std::unique_ptr<weld::CheckButton> m_xAnimatedTexts; + std::unique_ptr<weld::Widget> m_xAnimatedTextsImg; std::unique_ptr<weld::ComboBox> m_xHighContrast; + std::unique_ptr<weld::Widget> m_xHighContrastImg; + std::unique_ptr<weld::Label> m_xHighContrastLabel; std::unique_ptr<weld::CheckButton> m_xAutomaticFontColor; + std::unique_ptr<weld::Widget> m_xAutomaticFontColorImg; std::unique_ptr<weld::CheckButton> m_xPagePreviews; + std::unique_ptr<weld::Widget> m_xPagePreviewsImg; public: SvxAccessibilityOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); |