mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
fix truncation of alert content in windows
This commit is contained in:
parent
81810fced5
commit
aebc670b62
1 changed files with 3 additions and 2 deletions
|
@ -734,8 +734,9 @@ public class AppServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] lines = content.split("\r\n|\r|\n");
|
String[] lines = content.split("\r\n|\r|\n");
|
||||||
if(lines.length > 3) {
|
if(lines.length > 3 || org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.WINDOWS) {
|
||||||
alert.getDialogPane().setPrefHeight(200 + lines.length * 20);
|
double numLines = Arrays.stream(lines).mapToDouble(line -> Math.ceil(TextUtils.computeTextWidth(Font.getDefault(), line, 0) / 300)).sum();
|
||||||
|
alert.getDialogPane().setPrefHeight(200 + numLines * 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
moveToActiveWindowScreen(alert);
|
moveToActiveWindowScreen(alert);
|
||||||
|
|
Loading…
Reference in a new issue