mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 13:16:44 +00:00
set dialog minimum height to preferred height (or make resizable) to avoid window sizing bug in some linux environments
This commit is contained in:
parent
a5312374a8
commit
9391a397da
21 changed files with 22 additions and 0 deletions
|
@ -22,6 +22,7 @@ public class WelcomeDialog extends Dialog<Mode> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(600);
|
dialogPane.setPrefWidth(600);
|
||||||
dialogPane.setPrefHeight(520);
|
dialogPane.setPrefHeight(520);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
dialogPane.getStylesheets().add(AppServices.class.getResource("welcome.css").toExternalForm());
|
dialogPane.getStylesheets().add(AppServices.class.getResource("welcome.css").toExternalForm());
|
||||||
|
|
|
@ -91,6 +91,7 @@ public abstract class DeviceDialog<R> extends Dialog<R> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(500);
|
dialogPane.setPrefWidth(500);
|
||||||
dialogPane.setPrefHeight(360);
|
dialogPane.setPrefHeight(360);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton == cancelButtonType ? null : getResult());
|
setResultConverter(dialogButton -> dialogButton == cancelButtonType ? null : getResult());
|
||||||
|
|
|
@ -139,6 +139,7 @@ public class MnemonicGridDialog extends Dialog<List<String>> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(952);
|
dialogPane.setPrefWidth(952);
|
||||||
dialogPane.setPrefHeight(500);
|
dialogPane.setPrefHeight(500);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class QRDisplayDialog extends Dialog<ButtonType> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(40 + qrSize + 40);
|
dialogPane.setPrefWidth(40 + qrSize + 40);
|
||||||
dialogPane.setPrefHeight(40 + qrSize + 85);
|
dialogPane.setPrefHeight(40 + qrSize + 85);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton);
|
setResultConverter(dialogButton -> dialogButton);
|
||||||
|
@ -143,6 +144,7 @@ public class QRDisplayDialog extends Dialog<ButtonType> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(40 + qrSize + 40);
|
dialogPane.setPrefWidth(40 + qrSize + 40);
|
||||||
dialogPane.setPrefHeight(40 + qrSize + 85);
|
dialogPane.setPrefHeight(40 + qrSize + 85);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton);
|
setResultConverter(dialogButton -> dialogButton);
|
||||||
|
|
|
@ -173,6 +173,7 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
dialogPane.getButtonTypes().addAll(hdButtonType, camButtonType, cancelButtonType);
|
dialogPane.getButtonTypes().addAll(hdButtonType, camButtonType, cancelButtonType);
|
||||||
dialogPane.setPrefWidth(646);
|
dialogPane.setPrefWidth(646);
|
||||||
dialogPane.setPrefHeight(webcamResolutionProperty.get() == WebcamResolution.HD ? 490 : 590);
|
dialogPane.setPrefHeight(webcamResolutionProperty.get() == WebcamResolution.HD ? 490 : 590);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? result : null);
|
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? result : null);
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class SendToManyDialog extends Dialog<List<Payment>> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(850);
|
dialogPane.setPrefWidth(850);
|
||||||
dialogPane.setPrefHeight(500);
|
dialogPane.setPrefHeight(500);
|
||||||
|
setResizable(true);
|
||||||
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class TextAreaDialog extends Dialog<String> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(700);
|
dialogPane.setPrefWidth(700);
|
||||||
dialogPane.setPrefHeight(400);
|
dialogPane.setPrefHeight(400);
|
||||||
|
setResizable(true);
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class WalletExportDialog extends Dialog<Wallet> {
|
||||||
dialogPane.getButtonTypes().addAll(cancelButtonType);
|
dialogPane.getButtonTypes().addAll(cancelButtonType);
|
||||||
dialogPane.setPrefWidth(500);
|
dialogPane.setPrefWidth(500);
|
||||||
dialogPane.setPrefHeight(480);
|
dialogPane.setPrefHeight(480);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? wallet : null);
|
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? wallet : null);
|
||||||
|
|
|
@ -90,6 +90,7 @@ public class WalletImportDialog extends Dialog<Wallet> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(500);
|
dialogPane.setPrefWidth(500);
|
||||||
dialogPane.setPrefHeight(600);
|
dialogPane.setPrefHeight(600);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? wallet : null);
|
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? wallet : null);
|
||||||
|
|
|
@ -116,6 +116,7 @@ public class WalletSummaryDialog extends Dialog<Void> {
|
||||||
ButtonType okButtonType = new javafx.scene.control.ButtonType("Done", ButtonBar.ButtonData.OK_DONE);
|
ButtonType okButtonType = new javafx.scene.control.ButtonType("Done", ButtonBar.ButtonData.OK_DONE);
|
||||||
dialogPane.getButtonTypes().addAll(okButtonType);
|
dialogPane.getButtonTypes().addAll(okButtonType);
|
||||||
|
|
||||||
|
setResizable(true);
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class KeystoreImportDialog extends Dialog<Keystore> {
|
||||||
dialogPane.getButtonTypes().add(cancelButtonType);
|
dialogPane.getButtonTypes().add(cancelButtonType);
|
||||||
dialogPane.setPrefWidth(650);
|
dialogPane.setPrefWidth(650);
|
||||||
dialogPane.setPrefHeight(690);
|
dialogPane.setPrefHeight(690);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? getWatchOnlyKeystore() : null);
|
setResultConverter(dialogButton -> dialogButton != cancelButtonType ? getWatchOnlyKeystore() : null);
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class PayNymAddressesDialog extends Dialog<Boolean> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(800);
|
dialogPane.setPrefWidth(800);
|
||||||
dialogPane.setPrefHeight(600);
|
dialogPane.setPrefHeight(600);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
|
|
||||||
setResizable(true);
|
setResizable(true);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class PayNymDialog extends Dialog<PayNym> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(730);
|
dialogPane.setPrefWidth(730);
|
||||||
dialogPane.setPrefHeight(600);
|
dialogPane.setPrefHeight(600);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class PreferencesDialog extends Dialog<Boolean> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(750);
|
dialogPane.setPrefWidth(750);
|
||||||
dialogPane.setPrefHeight(630);
|
dialogPane.setPrefHeight(630);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
preferencesController.reconnectOnClosingProperty().set(AppServices.isConnecting() || AppServices.isConnected());
|
preferencesController.reconnectOnClosingProperty().set(AppServices.isConnecting() || AppServices.isConnected());
|
||||||
|
|
|
@ -90,6 +90,7 @@ public class ServerAliasDialog extends Dialog<Server> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(680);
|
dialogPane.setPrefWidth(680);
|
||||||
dialogPane.setPrefHeight(500);
|
dialogPane.setPrefHeight(500);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
AppServices.setStageIcon(dialogPane.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class CounterpartyDialog extends Dialog<Boolean> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(730);
|
dialogPane.setPrefWidth(730);
|
||||||
dialogPane.setPrefHeight(520);
|
dialogPane.setPrefHeight(520);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class InitiatorDialog extends Dialog<Transaction> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(730);
|
dialogPane.setPrefWidth(730);
|
||||||
dialogPane.setPrefHeight(530);
|
dialogPane.setPrefHeight(530);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
dialogPane.getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
|
dialogPane.getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class AdvancedDialog extends Dialog<Boolean> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(400);
|
dialogPane.setPrefWidth(400);
|
||||||
dialogPane.setPrefHeight(300);
|
dialogPane.setPrefHeight(300);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setOnCloseRequest(event -> {
|
setOnCloseRequest(event -> {
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class MixToDialog extends Dialog<MixConfig> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(400);
|
dialogPane.setPrefWidth(400);
|
||||||
dialogPane.setPrefHeight(300);
|
dialogPane.setPrefHeight(300);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
setResultConverter(dialogButton -> dialogButton == applyButtonType ? mixToController.getMixConfig() : null);
|
setResultConverter(dialogButton -> dialogButton == applyButtonType ? mixToController.getMixConfig() : null);
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class MultisigBackupDialog extends Dialog<String> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(700);
|
dialogPane.setPrefWidth(700);
|
||||||
dialogPane.setPrefHeight(500);
|
dialogPane.setPrefHeight(500);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class WhirlpoolDialog extends Dialog<Tx0Preview> {
|
||||||
|
|
||||||
dialogPane.setPrefWidth(600);
|
dialogPane.setPrefWidth(600);
|
||||||
dialogPane.setPrefHeight(570);
|
dialogPane.setPrefHeight(570);
|
||||||
|
dialogPane.setMinHeight(dialogPane.getPrefHeight());
|
||||||
AppServices.moveToActiveWindowScreen(this);
|
AppServices.moveToActiveWindowScreen(this);
|
||||||
|
|
||||||
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
||||||
|
|
Loading…
Reference in a new issue