Changeset 18782 in josm for trunk/src


Ignore:
Timestamp:
2023-07-26T18:14:37+02:00 (12 months ago)
Author:
taylor.smock
Message:

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.

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadTextComponentValidator.java

    r18491 r18782  
    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);
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java

    r17238 r18782  
    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();
Note: See TracChangeset for help on using the changeset viewer.