Skip to content

Commit 9d540bc

Browse files
author
taylor.smock
committed
Fix #23024: Set foreground color for feedback warning label (patch by Larsossum, modified)
This fixes an issue where a dark colour theme would use a light-coloured foreground when we set the background colour to a light colour. git-svn-id: https://josm.openstreetmap.de/svn/trunk@18782 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent be9273e commit 9d540bc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/org/openstreetmap/josm/gui/io/UploadTextComponentValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected void feedbackWarning(String msg) {
4848
super.feedbackWarning(msg);
4949
if (!Objects.equals(msg, feedback.getText())) {
5050
feedback.setText(msg);
51-
feedback.setForeground(null);
51+
feedback.setForeground(WARNING_FOREGROUND);
5252
feedback.setBackground(WARNING_BACKGROUND);
5353
feedback.setBorder(WARNING_BORDER);
5454
}

src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public abstract class AbstractTextComponentValidator extends ChangeNotifier
4545

4646
protected static final Color WARNING_COLOR = new NamedColorProperty(marktr("Input validation: warning"), new Color(0xFFA500)).get();
4747
protected static final Border WARNING_BORDER = BorderFactory.createLineBorder(WARNING_COLOR, 1);
48+
protected static final Color WARNING_FOREGROUND = new NamedColorProperty(
49+
marktr("Input validation: warning foreground"), Color.BLACK).get();
4850
protected static final Color WARNING_BACKGROUND = new NamedColorProperty(
4951
marktr("Input validation: warning background"), new Color(0xFFEDCC)).get();
5052

0 commit comments

Comments
 (0)