From abe76b35f48e774bb71f4d5b96ea4e15fc71a748 Mon Sep 17 00:00:00 2001 From: mwganson Date: Sun, 2 Jan 2022 15:44:11 -0600 Subject: [PATCH] [TechDraw] Use global DontUseNativeColorDialog parameter from BaseApp/Preferences/Dialog when opening color dialog --- src/Mod/TechDraw/Gui/mrichtextedit.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Mod/TechDraw/Gui/mrichtextedit.cpp b/src/Mod/TechDraw/Gui/mrichtextedit.cpp index ad136a9358..43759f3b43 100644 --- a/src/Mod/TechDraw/Gui/mrichtextedit.cpp +++ b/src/Mod/TechDraw/Gui/mrichtextedit.cpp @@ -51,9 +51,9 @@ #include #include #include +#include #include - #include "PreferencesGui.h" #include "mrichtextedit.h" @@ -433,7 +433,12 @@ void MRichTextEdit::textStyle(int index) { } void MRichTextEdit::textFgColor() { - QColor col = QColorDialog::getColor(f_textedit->textColor(), this); + QColor col; + if (Gui::DialogOptions::dontUseNativeColorDialog()){ + col = QColorDialog::getColor(f_textedit->textColor(),this, QLatin1String(""), QColorDialog::DontUseNativeDialog); + } else { + col = QColorDialog::getColor(f_textedit->textColor(), this); + } QTextCursor cursor = f_textedit->textCursor(); if (!cursor.hasSelection()) { cursor.select(QTextCursor::WordUnderCursor); @@ -450,7 +455,12 @@ void MRichTextEdit::textFgColor() { } void MRichTextEdit::textBgColor() { - QColor col = QColorDialog::getColor(f_textedit->textBackgroundColor(), this); + QColor col; + if (Gui::DialogOptions::dontUseNativeColorDialog()){ + col = QColorDialog::getColor(f_textedit->textBackgroundColor(),this, QLatin1String(""), QColorDialog::DontUseNativeDialog); + } else { + col = QColorDialog::getColor(f_textedit->textBackgroundColor(), this); + } QTextCursor cursor = f_textedit->textCursor(); if (!cursor.hasSelection()) { cursor.select(QTextCursor::WordUnderCursor);