mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
QT: implement TColorDialog.Options cdNoButtons and cdDontUseNativeDialog.
This commit is contained in:
parent
1408958bc6
commit
4360b24b70
@ -293,7 +293,9 @@ type
|
|||||||
cdShowHelp, // Causes the dialog box to display the Help button.
|
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.
|
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.
|
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;
|
TColorDialogOptions = set of TColorDialogOption;
|
||||||
|
|
||||||
|
@ -897,6 +897,10 @@ begin
|
|||||||
AOptions := 0; // here we add possible options from ColorDialog.Options, see QColorDialogColorDialogOptions for possible options.
|
AOptions := 0; // here we add possible options from ColorDialog.Options, see QColorDialogColorDialogOptions for possible options.
|
||||||
if (cdShowAlphaChannel in ColorDialog.Options) then
|
if (cdShowAlphaChannel in ColorDialog.Options) then
|
||||||
AOptions := AOptions or QColorDialogShowAlphaChannel;
|
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);
|
QColorDialog_getColor(PQColor(@AQColorRet), PQColor(@AQColor), TQtWSCommonDialog.GetDialogParent(ACommonDialog), @ATitle, AOptions);
|
||||||
|
|
||||||
ReturnBool := AQColorRet.ColorSpec <> 0;
|
ReturnBool := AQColorRet.ColorSpec <> 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user