From 96fbbc35efebc1a8364402e36433ab51443d8e89 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 17 Sep 2014 16:41:14 +0100 Subject: [PATCH] Correct colour for text when colour set --- src/jalview/gui/UserDefinedColours.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 3c87e4c..fec36e5 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -250,18 +250,19 @@ AlignmentPanel ap; if (selectedButtons != null) { JButton button = null; + final Color newColour = colorChooser.getColor(); for (int i = 0; i < selectedButtons.size(); i++) { button = (JButton) selectedButtons.elementAt(i); - button.setBackground(colorChooser.getColor()); - button.setForeground(brighterThan(button.getBackground())); + button.setBackground(newColour); + button.setForeground(brighterThan(newColour)); } if (button == lcaseColour) { for (int i = 0; i < lowerCaseButtons.size(); i++) { button = (JButton) lowerCaseButtons.elementAt(i); - button.setBackground(colorChooser.getColor()); + button.setBackground(newColour); button.setForeground(brighterThan(button.getBackground())); } } -- 1.7.10.2