diff --git a/lcl/dialogs.pp b/lcl/dialogs.pp index 6ac54612e5..785f7f93e9 100644 --- a/lcl/dialogs.pp +++ b/lcl/dialogs.pp @@ -293,7 +293,9 @@ type cdShowHelp, // Causes the dialog box to display the Help button. cdSolidColor, // Causes the dialog box to display only solid colors in the set of basic colors. cdAnyColor, // Causes the dialog box to display all available colors in the set of basic colors. - cdShowAlphaChannel // Shows the AlphaChannel control (GTK2, QT, QT5, QT6) + cdShowAlphaChannel, // Shows the AlphaChannel control (GTK2, QT, QT5, QT6) + cdNoButtons, // Removes the buttons from the dialog (QT, QT5, QT6) + cdDontUseNativeDialog // Use QT dialog, not the dialog of the OS (QT, QT5, Qt6) ); TColorDialogOptions = set of TColorDialogOption; diff --git a/lcl/interfaces/qt/qtwsdialogs.pp b/lcl/interfaces/qt/qtwsdialogs.pp index 543c565ca2..36cbe7622b 100644 --- a/lcl/interfaces/qt/qtwsdialogs.pp +++ b/lcl/interfaces/qt/qtwsdialogs.pp @@ -897,6 +897,10 @@ begin AOptions := 0; // here we add possible options from ColorDialog.Options, see QColorDialogColorDialogOptions for possible options. if (cdShowAlphaChannel in ColorDialog.Options) then AOptions := AOptions or QColorDialogShowAlphaChannel; + if (cdNoButtons in ColorDialog.Options) then + AOptions := AOptions or QColorDialogNoButtons; + if (cdDontUseNativeDialog in ColorDialog.Options) then + AOptions := AOptions or QColorDialogDontUseNativeDialog; QColorDialog_getColor(PQColor(@AQColorRet), PQColor(@AQColor), TQtWSCommonDialog.GetDialogParent(ACommonDialog), @ATitle, AOptions); ReturnBool := AQColorRet.ColorSpec <> 0;