From: gmungoc Date: Thu, 30 Mar 2017 11:48:42 +0000 (+0100) Subject: JAL-2401 don't apply lower case colour to upper case X-Git-Tag: Release_2_10_3b1~336^2~2^2~1^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bbad0d026977fa78805e90e7c90521db9d7536c2;p=jalview.git JAL-2401 don't apply lower case colour to upper case --- diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 463d8cd..6e9a121 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -72,7 +72,7 @@ public class UserDefinedColours extends GUserDefinedColours implements private static final String LAST_DIRECTORY = "LAST_DIRECTORY"; - private static final int MY_FRAME_HEIGHT = 420; + private static final int MY_FRAME_HEIGHT = 440; private static final int MY_FRAME_WIDTH = 810; @@ -277,14 +277,9 @@ public class UserDefinedColours extends GUserDefinedColours implements { JButton button = null; final Color newColour = colorChooser.getColor(); - for (int i = 0; i < selectedButtons.size(); i++) - { - button = selectedButtons.get(i); - button.setBackground(newColour); - button.setForeground(ColorUtils.brighterThan(newColour)); - } if (lcaseColour.isSelected()) { + selectedButtons.clear(); for (int i = 0; i < lowerCaseButtons.size(); i++) { button = lowerCaseButtons.get(i); @@ -292,6 +287,12 @@ public class UserDefinedColours extends GUserDefinedColours implements button.setForeground(ColorUtils.brighterThan(button.getBackground())); } } + for (int i = 0; i < selectedButtons.size(); i++) + { + button = selectedButtons.get(i); + button.setBackground(newColour); + button.setForeground(ColorUtils.brighterThan(newColour)); + } } /**