#2673 User preferences font scaling not working with display styling/theme updates (#2677)

Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
Denny Sheirer
2026-11-18 02:12:32 -05:00
committed by GitHub
parent c46b80b06b
commit bc7dd201ab

View File

@@ -502,10 +502,10 @@ public class ThemeManager
.append("-fx-background-color: ").append(accent).append(";")
.append("}");
//URL-encode the body; java.net.URLEncoder is fine for our restricted charset.
String encoded = java.net.URLEncoder.encode(css.toString(),
java.nio.charset.StandardCharsets.UTF_8);
return "data:text/css," + encoded;
//Base64-encode the body. Don't use URLEncoder: it is form encoding and turns spaces
//into '+', which a data URL doesn't decode, so JavaFX silently drops the whole sheet.
return "data:text/css;base64," + java.util.Base64.getEncoder().encodeToString(
css.toString().getBytes(java.nio.charset.StandardCharsets.UTF_8));
}
catch(Throwable t)
{