From 5bf38da0910f590159e8fa4fe359f98c7bd395a4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 15 Oct 2022 20:10:04 +0100 Subject: tdf#151522 add Accessibility::HighContrast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0 Automatic, do what the system says 1 Disable 2 Enable Forcing Disable/Enable won't have (much of) an effect on the widgetry, but will affect how document content is rendered where typically content color is mapped to fore/back ground color. Change-Id: I71a2dcf8bc334080414a01691f942a5b7de7b84a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139753 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- cui/source/options/optaccessibility.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cui/source/options/optaccessibility.cxx') diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index 1f85254dae22..d0a3694a3c73 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -29,6 +29,7 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container* , m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly")) , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics")) , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext")) + , m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast")) , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor")) , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor")) { @@ -60,6 +61,8 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* ) officecfg::Office::Common::Accessibility::IsAutomaticFontColor::set(m_xAutomaticFontColor->get_active(), batch); if ( !officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() ) officecfg::Office::Common::Accessibility::IsSelectionInReadonly::set(m_xTextSelectionInReadonly->get_active(), batch); + if ( !officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() ) + officecfg::Office::Common::Accessibility::HighContrast::set(m_xHighContrast->get_active(), batch); batch->commit(); AllSettings aAllSettings = Application::GetSettings(); @@ -96,6 +99,10 @@ void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* ) if( officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() ) m_xTextSelectionInReadonly->set_sensitive(false); + m_xHighContrast->set_active( officecfg::Office::Common::Accessibility::HighContrast::get() ); + if( officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() ) + m_xHighContrast->set_sensitive(false); + AllSettings aAllSettings = Application::GetSettings(); const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings(); m_xAccessibilityTool->set_active(aMiscSettings.GetEnableATToolSupport()); -- cgit