From 9af055e4ca28d8cdb61b9ecebbdd8168aab066a1 Mon Sep 17 00:00:00 2001 From: bancika Date: Sun, 17 Jan 2021 09:58:09 +0100 Subject: [PATCH] Color chooser dialog defaults to the existing color value being edited --- diylc/diylc-core/src/org/diylc/presenter/update.xml | 6 +++++- .../src/org/diylc/swing/gui/editor/ColorEditor.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/diylc/diylc-core/src/org/diylc/presenter/update.xml b/diylc/diylc-core/src/org/diylc/presenter/update.xml index 714a53b1..2ca03954 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/update.xml +++ b/diylc/diylc-core/src/org/diylc/presenter/update.xml @@ -3493,7 +3493,11 @@ NEW_FEATURE When editing component colors, honor the specified 'alpha' value specified on each color individually in addition to the component-level alpha property - + + + IMPROVEMENT + Color chooser dialog defaults to the existing color value being edited + IMPROVEMENT Single click to expand and collapse categories in the component tree diff --git a/diylc/diylc-swing/src/org/diylc/swing/gui/editor/ColorEditor.java b/diylc/diylc-swing/src/org/diylc/swing/gui/editor/ColorEditor.java index 4ecf74fc..ccddcbce 100644 --- a/diylc/diylc-swing/src/org/diylc/swing/gui/editor/ColorEditor.java +++ b/diylc/diylc-swing/src/org/diylc/swing/gui/editor/ColorEditor.java @@ -105,7 +105,7 @@ public class ColorEditor extends JPanel { @Override public void mouseClicked(MouseEvent e) { - Color newColor = JColorChooser.showDialog(ColorEditor.this, "Choose Color", getBackground()); + Color newColor = JColorChooser.showDialog(ColorEditor.this, "Choose Color", colorLabel.getBackground()); if (newColor != null) { property.setChanged(true); property.setValue(new Color(newColor.getRGB()));