summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformdialoghelper.h
diff options
context:
space:
mode:
authorFabio Falsini <falsinsoft@gmail.com>2023-05-17 20:54:52 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-06-06 19:49:06 +0000
commit211b54ea470a0c7f69205f045593aaa4efd01072 (patch)
treeb0ec6f916d8ce32806722e44a4ec61e59cc41c93 /src/gui/kernel/qplatformdialoghelper.h
parent2a7da1b3c8c4096d7c2b09f3fcc58e9cf47867cd (diff)
Add flag to hide eye dropper button from QColorDialog
There are cases where this eye dropper control is useful and other cases where it is useless. In case of an application connected with graphics it's useful because it allows to select a precise color in a very simple way. But in the case of a simple app where the user only has to choose a color for, example, a graph this control is useless and risks confusing the user (this kind of control is only present in graphics software, not all "normal" users know what it is for or understand its use). This patch add a flag to hide the button. As a drive-by change, the internal screenColorPickerButton pointer is renamed to eyeDropperButton to be more consistent with the qml ColorDialog. [ChangeLog][QtWidgets][QColorDialog] Added a NoEyeDropperButton option to hide the eye dropper button. Change-Id: Ib29d5343383af97c1f488f9e33749517181aead7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformdialoghelper.h')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index fabc4985a3..150a2333c1 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -157,7 +157,8 @@ public:
enum ColorDialogOption {
ShowAlphaChannel = 0x00000001,
NoButtons = 0x00000002,
- DontUseNativeDialog = 0x00000004
+ DontUseNativeDialog = 0x00000004,
+ NoEyeDropperButton = 0x00000008
};
Q_DECLARE_FLAGS(ColorDialogOptions, ColorDialogOption)