officecfg/registry/data/org/openoffice/Office/Common.xcu | 2 ++ officecfg/registry/schema/org/openoffice/Office/Common.xcs | 9 +++++++++ vcl/source/app/ColorDialog.cxx | 9 +++++++++ 3 files changed, 20 insertions(+)
New commits: commit 5bb41f2a588caff88b2fd957af9c9e94d8cdf2e0 Author: Michael Weghorn <[email protected]> AuthorDate: Fri Dec 5 16:59:14 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Sat Dec 6 08:43:02 2025 +0100 tdf#169505 Allow disabling native color pickers Similar to the existing option that allows disabling system/toolkit file pickers (officecfg::Office::Common::Misc::UseSystemFileDialog), also add an option (officecfg::Office::Common::Misc::UseSystemColorDialog::get) to disable the system/toolkit color pickers, which were unconditionally enabled for the GTK and Qt based VCL plugins in commits commit dae9472b27914807ec08062e8293a091e90cffb6 Author: Michael Weghorn <[email protected]> Date: Fri Jul 25 14:26:06 2025 +0200 tdf#167669 weld: Introduce weld::ColorChooserDialog and commit c0721600c294ebc46217477a80a8eea34609e4bc Author: Michael Weghorn <[email protected]> Date: Fri Jul 25 14:55:34 2025 +0200 tdf#167669 gtk: Use native GtkColorChooserDialog and commit 072010169bb4668f3c624a9f379e8a79e4e3e57a Author: Michael Weghorn <[email protected]> Date: Fri Jul 25 15:09:25 2025 +0200 tdf#167669 tdf#130857 qt: Use native QColorDialog For users that prefer the custom LibreOffice dialog instead of the native toolkit ones, this allows switching back to the former one as follows: * "Tools" -> "Options" * "LibreOffice(Dev)" -> "Advanced" * press "Open Expert Configuration" button * search for "UseSystemColorDialog" and toggle the value of the corresponding setting to false A checkbox in the "General" tab of the options dialog to make toggling this easier will be added in a separate upcoming commit. Change-Id: I99c5f1e350c36aa3cb70f26724cce9263160f945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195104 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index 54cd6c148d83..22224887cff4 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -402,6 +402,8 @@ </node> </node> <node oor:name="Misc"> + <prop oor:name="UseSystemColorDialog"> + </prop> <prop oor:name="UseSystemFileDialog"> </prop> <prop oor:name="UseSystemPrintDialog" install:module="macosx"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 766de1514ddb..cd3ba8cc88f4 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5320,6 +5320,15 @@ </info> <value>true</value> </prop> + <prop oor:name="UseSystemColorDialog" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Determines if the system's color pickers should be + used. If false, the proprietary color picker implementation + will be used. Relevant on platforms where color picker + integration is implemented.</desc> + </info> + <value>true</value> + </prop> <prop oor:name="UseSystemFileDialog" oor:type="xs:boolean" oor:nillable="false"> <info> <desc>Determines if the system's file and folder pickers should be diff --git a/vcl/source/app/ColorDialog.cxx b/vcl/source/app/ColorDialog.cxx index b231fce639a5..7b9b8f90ef04 100644 --- a/vcl/source/app/ColorDialog.cxx +++ b/vcl/source/app/ColorDialog.cxx @@ -17,9 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <colorpicker.hxx> #include <salinst.hxx> #include <svdata.hxx> +#include <officecfg/Office/Common.hxx> #include <vcl/ColorDialog.hxx> #include <vcl/abstdlg.hxx> #include <vcl/weld.hxx> @@ -49,6 +51,13 @@ private: ColorDialog::ColorDialog(weld::Window* pParent, vcl::ColorPickerMode eMode) { + if (!officecfg::Office::Common::Misc::UseSystemColorDialog::get()) + { + // use custom LibreOffice color picker dialog + m_pColorDialogController = std::make_shared<ColorPickerDialog>(pParent, COL_BLACK, eMode); + return; + } + std::unique_ptr<weld::ColorChooserDialog> pDialog = GetSalInstance()->CreateColorChooserDialog(pParent, eMode); assert(pDialog);
