diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-23 17:54:37 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-23 20:02:09 +0200 |
commit | 8118a5d2eb1524768784adc0b143b8cc1b9f3f61 (patch) | |
tree | 1429536e60748b32cf30799ed90270624e52cdd2 /cui | |
parent | eded58214c4a4a7c55530b842cec5837ea36caba (diff) |
tdf#104086 cui: enable OpenGL when ignoring its blacklist
"Ignore OpenGL blacklist" is called "force OpenGL" in the code, so it
make sense that OpenGLHelper::isVCLOpenGLEnabled() returns true in that
case. But the UI suggested that enabling ignore doesn't enable OpenGL
itself.
Fix this by auto-checking the parent UI widget when enabling the
blacklist.
Change-Id: I16bec69aebd645858260850f15ea8e687566fd0e
Reviewed-on: https://gerrit.libreoffice.org/54720
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 9 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index eca23fb512c9..5b6538eb65dc 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -659,6 +659,8 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet) #endif + m_pForceOpenGL->SetToggleHdl(LINK(this, OfaViewTabPage, OnForceOpenGLToggled)); + // Set known icon themes OUString sAutoStr( m_pIconStyleLB->GetEntry( 0 ) ); m_pIconStyleLB->Clear(); @@ -736,6 +738,13 @@ IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, CheckBox&, void ) } #endif +IMPL_LINK_NOARG(OfaViewTabPage, OnForceOpenGLToggled, CheckBox&, void) +{ + if (m_pForceOpenGL->IsChecked()) + // Ignoring the opengl blacklist implies that opengl is on. + m_pUseOpenGL->Check(); +} + VclPtr<SfxTabPage> OfaViewTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) { return VclPtr<OfaViewTabPage>::Create(pParent.pParent, *rAttrSet); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 852b8472476e..f6296ff87679 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -121,6 +121,7 @@ private: #if defined( UNX ) DECL_LINK( OnAntialiasingToggled, CheckBox&, void ); #endif + DECL_LINK(OnForceOpenGLToggled, CheckBox&, void); void UpdateOGLStatus(); public: |