Changeset 17299 in josm for trunk/src/org
- Timestamp:
- 2020-11-06T08:11:47+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r17117 r17299 57 57 + "body {font-family: sans-serif; font-weight: bold; }\n" 58 58 + "h1 {text-align: center; }\n" 59 + "a {color: " + JosmEditorPane.getLinkColor( "#316ed9") + "; }\n"59 + "a {color: " + JosmEditorPane.getLinkColor() + "; }\n" 60 60 + ".icon {font-size: 0; }\n" 61 61 + "</style>\n"; -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r17117 r17299 138 138 139 139 // overwrite link color 140 String linkColor = JosmEditorPane.getLinkColor( null);140 String linkColor = JosmEditorPane.getLinkColor(); 141 141 if (linkColor != null) { 142 142 ss.addRule("a {color: " + linkColor + "}"); -
trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java
r17117 r17299 57 57 f.isItalic() ? "italic" : "normal" 58 58 ) + '}'); 59 ss.addRule("a {text-decoration: underline; color: " + JosmEditorPane.getLinkColor( "blue") + "}");59 ss.addRule("a {text-decoration: underline; color: " + JosmEditorPane.getLinkColor() + "}"); 60 60 ss.addRule("ul {margin-left: 1cm; list-style-type: disc}"); 61 61 JosmHTMLEditorKit kit = new JosmHTMLEditorKit(); -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
r17117 r17299 102 102 final StyleSheet ss = new StyleSheet(); 103 103 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() + "}"); 105 105 ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + '}'); 106 106 ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}"); … … 144 144 /** 145 145 * 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. 148 147 * @return link color 149 148 */ 150 public static String getLinkColor( String defaultColor) {149 public static String getLinkColor() { 151 150 Color color = UIManager.getColor("Component.linkColor"); 152 return color != null ? ColorHelper.color2html(color) : defaultColor;151 return color != null ? ColorHelper.color2html(color) : "#316ed9"; 153 152 } 154 153 -
trunk/src/org/openstreetmap/josm/gui/widgets/UrlLabel.java
r15775 r17299 93 93 protected final void refresh() { 94 94 if (url != null && !url.isEmpty()) { 95 refresh("<html><a href=\"" +url+"\">"+description+"</a></html>",95 refresh("<html><a color=\"" + JosmEditorPane.getLinkColor() + "\" href=\"" + url + "\">" + description + "</a></html>", 96 96 Cursor.getPredefinedCursor(Cursor.HAND_CURSOR), 97 97 String.format("<html>%s<br/>%s</html>", url, tr("Right click = copy to clipboard")));
Note:
See TracChangeset
for help on using the changeset viewer.