diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-23 17:54:37 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-01 20:46:22 +0200 |
commit | 4052526b0a3e843b0c4d4c57facdcc195b728844 (patch) | |
tree | 9f6a1441c230001ae9e7f2b60781976d0ac4328a /cui | |
parent | 4dbc7929474d23c143a1be9618c64019cb48c038 (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.
(cherry picked from commit 8118a5d2eb1524768784adc0b143b8cc1b9f3f61)
Conflicts:
cui/source/options/optgdlg.cxx
Change-Id: I16bec69aebd645858260850f15ea8e687566fd0e
Reviewed-on: https://gerrit.libreoffice.org/54763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 6e37f748096a7fd7d7a3a07b2393c5f8960cfeb5)
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 1c90931c7afb..38acc1d22b4f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -663,6 +663,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(); @@ -739,6 +741,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( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { return VclPtr<OfaViewTabPage>::Create(pParent, *rAttrSet); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index ceba711ede24..b7e47e722edc 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: |