mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-17 11:07:35 -05:00
Compare commits
1 Commits
DSheirer-p
...
2673-spect
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99d61ac24d |
@@ -502,10 +502,10 @@ public class ThemeManager
|
|||||||
.append("-fx-background-color: ").append(accent).append(";")
|
.append("-fx-background-color: ").append(accent).append(";")
|
||||||
.append("}");
|
.append("}");
|
||||||
|
|
||||||
//URL-encode the body; java.net.URLEncoder is fine for our restricted charset.
|
//Base64-encode the body. Don't use URLEncoder: it is form encoding and turns spaces
|
||||||
String encoded = java.net.URLEncoder.encode(css.toString(),
|
//into '+', which a data URL doesn't decode, so JavaFX silently drops the whole sheet.
|
||||||
java.nio.charset.StandardCharsets.UTF_8);
|
return "data:text/css;base64," + java.util.Base64.getEncoder().encodeToString(
|
||||||
return "data:text/css," + encoded;
|
css.toString().getBytes(java.nio.charset.StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
catch(Throwable t)
|
catch(Throwable t)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user