From f03abb599d1b69f579b839fccb8663a96fc7b474 Mon Sep 17 00:00:00 2001 From: Koi Date: Sat, 14 Sep 2024 21:32:37 -0700 Subject: [PATCH 1/2] Removed DontUseNativeDialog to fix ColorPicker bug --- src/windows/color_picker.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/windows/color_picker.py b/src/windows/color_picker.py index e33e4aa1b9..e3e9709312 100644 --- a/src/windows/color_picker.py +++ b/src/windows/color_picker.py @@ -41,7 +41,6 @@ def __init__(self, initial_color: QColor, callback, extra_options=0, super().__init__(parent=parent, *args, **kwargs) self.setObjectName("ColorPicker") # Merge any additional user-supplied options with our own - options = QColorDialog.DontUseNativeDialog if extra_options > 0: options = options | extra_options # Set up non-modal color dialog (to avoid blocking the eyedropper) @@ -53,7 +52,6 @@ def __init__(self, initial_color: QColor, callback, extra_options=0, if title: self.dialog.setWindowTitle(title) self.dialog.setWindowFlags(Qt.Tool) - self.dialog.setOptions(options) # Avoid signal loops self.dialog.blockSignals(True) self.dialog.colorSelected.connect(callback) From 6bc490c1b812bff758614b3648daaacfef4fbb39 Mon Sep 17 00:00:00 2001 From: kaihilbourne Date: Mon, 16 Sep 2024 14:48:50 -0700 Subject: [PATCH 2/2] Adding requested fix --- src/windows/color_picker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/windows/color_picker.py b/src/windows/color_picker.py index e3e9709312..49331de81c 100644 --- a/src/windows/color_picker.py +++ b/src/windows/color_picker.py @@ -41,6 +41,7 @@ def __init__(self, initial_color: QColor, callback, extra_options=0, super().__init__(parent=parent, *args, **kwargs) self.setObjectName("ColorPicker") # Merge any additional user-supplied options with our own + options = QColorDialog.ColorDialogOptions() if extra_options > 0: options = options | extra_options # Set up non-modal color dialog (to avoid blocking the eyedropper) @@ -52,6 +53,7 @@ def __init__(self, initial_color: QColor, callback, extra_options=0, if title: self.dialog.setWindowTitle(title) self.dialog.setWindowFlags(Qt.Tool) + self.dialog.setOptions(options) # Avoid signal loops self.dialog.blockSignals(True) self.dialog.colorSelected.connect(callback)