From bbad0d026977fa78805e90e7c90521db9d7536c2 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 30 Mar 2017 12:48:42 +0100 Subject: [PATCH] JAL-2401 don't apply lower case colour to upper case --- src/jalview/gui/UserDefinedColours.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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)); + } } /** -- 1.7.10.2