diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-10-25 14:07:56 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-10-26 09:22:53 +0200 |
commit | ee368cc3f97886b9574e22fdf8a15c8225e785d5 (patch) | |
tree | 97f78db26364733bc56582b0faad1e41a4706ff1 /cui/source | |
parent | 54aa9a9cb7f283d2ed2853e064573564f16e353b (diff) |
tdf#157843 - UI: Part 8 - Unify lockdown behavior of Options dialog
for OpenCL Page.
Change-Id: I94c4a1afc7703de378ae65c0173d178954f647a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158424
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optopencl.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/optopencl.hxx | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index c3e154083c97..129cbc1b01b7 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -30,11 +30,13 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(weld::Container* pPage, weld::DialogControlle : SfxTabPage(pPage, pController, "cui/ui/optopenclpage.ui", "OptOpenCLPage", &rSet) , maConfig(OpenCLConfig::get()) , mxUseOpenCL(m_xBuilder->weld_check_button("useopencl")) + , mxUseOpenImg(m_xBuilder->weld_widget("lockuseopencl")) , mxOclUsed(m_xBuilder->weld_label("openclused")) , mxOclNotUsed(m_xBuilder->weld_label("openclnotused")) { mxUseOpenCL->set_active(maConfig.mbUseOpenCL); mxUseOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); + mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); bool bCLUsed = openclwrapper::GPUEnv::isOpenCLEnabled(); mxOclUsed->set_visible(bCLUsed); @@ -97,6 +99,7 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* ) maConfig = OpenCLConfig::get(); mxUseOpenCL->set_active(maConfig.mbUseOpenCL); + mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); mxUseOpenCL->save_state(); } diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index 1fce5e3ea9aa..e6414245da8f 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -27,6 +27,7 @@ private: OpenCLConfig maConfig; std::unique_ptr<weld::CheckButton> mxUseOpenCL; + std::unique_ptr<weld::Widget> mxUseOpenImg; std::unique_ptr<weld::Label> mxOclUsed; std::unique_ptr<weld::Label> mxOclNotUsed; |