From e5d3c088215a1e4dfa27c88b2ea5c86a916e8aed Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 4 Feb 2021 12:58:14 +0100 Subject: [PATCH] Fixed color of `
` tag in HTML text --- CHANGELOG.md | 1 + flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce35e54..e2c292d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FlatLaf Change Log - Label and ToolTip: Fixed font sizes for ``, ``, ``, `` and `` tags in HTML text. +- Fixed color of `
` tag in HTML text. ## 1.0-rc2 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 2fb686e1..02fed69b 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -262,7 +262,7 @@ public abstract class FlatLaf Color linkColor = defaults.getColor( "Component.linkColor" ); if( linkColor != null ) { new HTMLEditorKit().getStyleSheet().addRule( - String.format( "a { color: #%06x; }", linkColor.getRGB() & 0xffffff ) ); + String.format( "a, address { color: #%06x; }", linkColor.getRGB() & 0xffffff ) ); } }; @@ -304,7 +304,7 @@ public abstract class FlatLaf } // restore default link color - new HTMLEditorKit().getStyleSheet().addRule( "a { color: blue; }" ); + new HTMLEditorKit().getStyleSheet().addRule( "a, address { color: blue; }" ); postInitialization = null; // restore enable/disable window decorations