mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
ncolorpickerdialog: live mode
This commit is contained in:
@@ -29,11 +29,17 @@ Popup {
|
||||
if (selectedColor.hsvHue >= 0) {
|
||||
stableHue = selectedColor.hsvHue;
|
||||
}
|
||||
if (liveMode && visible) {
|
||||
colorSelected(selectedColor);
|
||||
}
|
||||
}
|
||||
readonly property real displayHue: selectedColor.hsvHue < 0 ? stableHue : selectedColor.hsvHue
|
||||
|
||||
signal colorSelected(color color)
|
||||
|
||||
// When true: hides Cancel/Apply, emits colorSelected on every color change
|
||||
property bool liveMode: false
|
||||
|
||||
width: 580
|
||||
padding: Style.marginXL
|
||||
|
||||
@@ -734,6 +740,7 @@ Popup {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: !root.liveMode
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 1
|
||||
Layout.bottomMargin: 1
|
||||
|
||||
Reference in New Issue
Block a user