Ignore:
Timestamp:
2020-11-06T08:11:47+01:00 (3 years ago)
Author:
simon04
Message:

see #19819 - Obtain link color using UIManager (default to JOSM blue)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java

    r17117 r17299  
    102102        final StyleSheet ss = new StyleSheet();
    103103        ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + '}');
    104         ss.addRule("a {text-decoration: underline; color: " + getLinkColor("blue") + "}");
     104        ss.addRule("a {text-decoration: underline; color: " + getLinkColor() + "}");
    105105        ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + '}');
    106106        ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
     
    144144    /**
    145145     * Returns the color (in CSS format) that should be used for links.
    146      * If the current look and feel does not provide a link color, the passed default color is used.
    147      * @param defaultColor the default color
     146     * If the current look and feel does not provide a link color, the JOSM blue {@code #316ed9} is returned.
    148147     * @return link color
    149148     */
    150     public static String getLinkColor(String defaultColor) {
     149    public static String getLinkColor() {
    151150        Color color = UIManager.getColor("Component.linkColor");
    152         return color != null ? ColorHelper.color2html(color) : defaultColor;
     151        return color != null ? ColorHelper.color2html(color) : "#316ed9";
    153152    }
    154153
Note: See TracChangeset for help on using the changeset viewer.