From: gmungoc Date: Wed, 17 Sep 2014 15:41:14 +0000 (+0100) Subject: Correct colour for text when colour set X-Git-Tag: Release_2_8_2b1^2~53^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=96fbbc35efebc1a8364402e36433ab51443d8e89;p=jalview.git Correct colour for text when colour set --- 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())); } }