fix(ui): prevent button text truncation across all dialogs with USE_PREF_SIZE and sizeToScene
This commit is contained in:
+13
-4
@@ -41,7 +41,6 @@ public class A1PasswordDialog {
|
||||
VBox root = new VBox(16);
|
||||
root.getStyleClass().add("dialog-container");
|
||||
root.setPadding(new Insets(24));
|
||||
root.setPrefWidth(440);
|
||||
|
||||
Label header = new Label("IMPORTAR CERTIFICADO A1");
|
||||
header.getStyleClass().add("dialog-header");
|
||||
@@ -70,14 +69,19 @@ public class A1PasswordDialog {
|
||||
actionsRow.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
Button btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().add("btn-secondary");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> {
|
||||
passwordFuture.complete(null);
|
||||
stage.close();
|
||||
});
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnConfirm = new Button("Importar");
|
||||
btnConfirm.getStyleClass().add("btn-primary");
|
||||
btnConfirm.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnConfirm.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnConfirm.setDefaultButton(true);
|
||||
btnConfirm.setOnAction(e -> {
|
||||
String text = passwordField.getText();
|
||||
@@ -85,7 +89,7 @@ public class A1PasswordDialog {
|
||||
stage.close();
|
||||
});
|
||||
|
||||
actionsRow.getChildren().addAll(btnCancel, btnConfirm);
|
||||
actionsRow.getChildren().addAll(btnCancel, spacer, btnConfirm);
|
||||
|
||||
root.getChildren().addAll(header, desc, fileBox, inputGroup, actionsRow);
|
||||
|
||||
@@ -93,6 +97,7 @@ public class A1PasswordDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
stage.setOnCloseRequest(e -> passwordFuture.complete(null));
|
||||
}
|
||||
|
||||
@@ -100,4 +105,8 @@ public class A1PasswordDialog {
|
||||
stage.show();
|
||||
return passwordFuture;
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -95,20 +95,25 @@ public class ApplicationApprovalDialog {
|
||||
|
||||
Button btnReject = new Button("Recusar Acesso");
|
||||
btnReject.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
||||
btnReject.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnReject.setOnAction(e -> {
|
||||
approvalFuture.complete(false);
|
||||
stage.close();
|
||||
});
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnAuthorize = new Button("Autorizar Conexão");
|
||||
btnAuthorize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnAuthorize.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnAuthorize.setDefaultButton(true);
|
||||
btnAuthorize.setOnAction(e -> {
|
||||
approvalFuture.complete(true);
|
||||
stage.close();
|
||||
});
|
||||
|
||||
actionsRow.getChildren().addAll(btnReject, btnAuthorize);
|
||||
actionsRow.getChildren().addAll(btnReject, spacer, btnAuthorize);
|
||||
|
||||
root.getChildren().addAll(header, detailsBox, secWarning, actionsRow);
|
||||
|
||||
@@ -116,6 +121,7 @@ public class ApplicationApprovalDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
stage.setOnCloseRequest(e -> approvalFuture.complete(false));
|
||||
}
|
||||
|
||||
@@ -124,4 +130,8 @@ public class ApplicationApprovalDialog {
|
||||
stage.toFront();
|
||||
return approvalFuture;
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-3
@@ -245,6 +245,7 @@ public final class BatchSigningDialog {
|
||||
|
||||
btnChooseOutputDir = new Button("Selecionar...");
|
||||
btnChooseOutputDir.getStyleClass().add("btn-secondary");
|
||||
btnChooseOutputDir.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnChooseOutputDir.setOnAction(e -> handleChooseOutputDir());
|
||||
|
||||
outputRow.getChildren().addAll(lblOutput, txtOutputDir, btnChooseOutputDir);
|
||||
@@ -266,16 +267,21 @@ public final class BatchSigningDialog {
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
Button btnClose = new Button("Fechar");
|
||||
btnClose.getStyleClass().add("btn-secondary");
|
||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> {
|
||||
if (!isRunning) stage.close();
|
||||
});
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
btnStart = new Button("Iniciar Assinatura em Lote");
|
||||
btnStart.getStyleClass().add("btn-primary");
|
||||
btnStart.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnStart.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnStart.setOnAction(e -> startBatchSigning());
|
||||
|
||||
footer.getChildren().addAll(btnClose, btnStart);
|
||||
footer.getChildren().addAll(btnClose, spacer, btnStart);
|
||||
|
||||
root.getChildren().addAll(header, fileActions, tableView, configBox, progressBox, footer);
|
||||
|
||||
@@ -283,6 +289,7 @@ public final class BatchSigningDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void handleAddFiles() {
|
||||
|
||||
+6
-2
@@ -129,8 +129,7 @@ public class CertificateDetailsDialog {
|
||||
|
||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnClose.setPrefWidth(110);
|
||||
btnClose.setMinWidth(110);
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
|
||||
actionsRow.getChildren().add(btnClose);
|
||||
@@ -141,12 +140,17 @@ public class CertificateDetailsDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
|
||||
private void addField(GridPane grid, int row, String label, String value) {
|
||||
Label lbl = new Label(label);
|
||||
lbl.getStyleClass().add("dialog-field-title");
|
||||
|
||||
+8
@@ -75,10 +75,12 @@ public final class CertificatesManagerDialog {
|
||||
|
||||
Button btnAddA1 = new Button("Importar A1 (.pfx / .p12)...");
|
||||
btnAddA1.getStyleClass().add("btn-primary");
|
||||
btnAddA1.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnAddA1.setOnAction(e -> handleImportA1());
|
||||
|
||||
Button btnRefresh = new Button(" Atualizar Lista", SvgIcons.refreshIcon(14));
|
||||
btnRefresh.getStyleClass().add("btn-secondary");
|
||||
btnRefresh.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnRefresh.setOnAction(e -> refreshList());
|
||||
|
||||
actions.getChildren().addAll(btnAddA1, btnRefresh);
|
||||
@@ -95,6 +97,7 @@ public final class CertificatesManagerDialog {
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||
btnClose.getStyleClass().add("btn-secondary");
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
footer.getChildren().add(btnClose);
|
||||
|
||||
@@ -104,6 +107,7 @@ public final class CertificatesManagerDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void refreshList() {
|
||||
@@ -189,4 +193,8 @@ public final class CertificatesManagerDialog {
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -37,8 +37,6 @@ public final class ExitConfirmationDialog {
|
||||
}
|
||||
this.stage.setTitle("CyberCore Signer — Encerrar ou Manter na Bandeja");
|
||||
this.stage.setResizable(false);
|
||||
this.stage.setMinWidth(520);
|
||||
this.stage.setMinHeight(190);
|
||||
|
||||
initLayout();
|
||||
}
|
||||
@@ -71,6 +69,7 @@ public final class ExitConfirmationDialog {
|
||||
|
||||
Button btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> {
|
||||
chosenAction = ExitChoice.CANCEL;
|
||||
stage.close();
|
||||
@@ -81,6 +80,7 @@ public final class ExitConfirmationDialog {
|
||||
|
||||
Button btnExit = new Button("Encerrar Definitivamente");
|
||||
btnExit.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
||||
btnExit.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnExit.setOnAction(e -> {
|
||||
chosenAction = ExitChoice.EXIT_COMPLETELY;
|
||||
stage.close();
|
||||
@@ -88,6 +88,7 @@ public final class ExitConfirmationDialog {
|
||||
|
||||
Button btnMinimize = new Button("Minimizar para a Bandeja");
|
||||
btnMinimize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnMinimize.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnMinimize.setDefaultButton(true);
|
||||
btnMinimize.setOnAction(e -> {
|
||||
chosenAction = ExitChoice.MINIMIZE_TO_TRAY;
|
||||
@@ -101,6 +102,7 @@ public final class ExitConfirmationDialog {
|
||||
Scene scene = new Scene(root);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
stage.setOnCloseRequest(e -> chosenAction = ExitChoice.CANCEL);
|
||||
}
|
||||
|
||||
|
||||
+14
-3
@@ -112,6 +112,7 @@ public final class FileSignDialog {
|
||||
|
||||
Button btnBrowse = new Button("Procurar...");
|
||||
btnBrowse.getStyleClass().add("btn-secondary");
|
||||
btnBrowse.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnBrowse.setOnAction(e -> handleBrowseFile());
|
||||
|
||||
fileRow.getChildren().addAll(txtFilePath, btnBrowse);
|
||||
@@ -159,15 +160,20 @@ public final class FileSignDialog {
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
Button btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().add("btn-secondary");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> stage.close());
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnSign = new Button("Assinar Documento");
|
||||
btnSign.getStyleClass().add("btn-primary");
|
||||
btnSign.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnSign.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnSign.setDefaultButton(true);
|
||||
btnSign.setOnAction(e -> executeSignature());
|
||||
|
||||
footer.getChildren().addAll(btnCancel, btnSign);
|
||||
footer.getChildren().addAll(btnCancel, spacer, btnSign);
|
||||
|
||||
root.getChildren().addAll(header, fileBox, certBox, footer);
|
||||
|
||||
@@ -175,6 +181,7 @@ public final class FileSignDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void handleBrowseFile() {
|
||||
@@ -257,4 +264,8 @@ public final class FileSignDialog {
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-6
@@ -64,7 +64,7 @@ public final class LogsViewerDialog {
|
||||
|
||||
Button btnCopy = new Button("Copiar");
|
||||
btnCopy.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnCopy.setPrefWidth(90);
|
||||
btnCopy.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCopy.setOnAction(e -> {
|
||||
javafx.scene.input.ClipboardContent content = new javafx.scene.input.ClipboardContent();
|
||||
content.putString(txtLogs.getText());
|
||||
@@ -77,7 +77,7 @@ public final class LogsViewerDialog {
|
||||
|
||||
Button btnClear = new Button("Limpar");
|
||||
btnClear.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnClear.setPrefWidth(90);
|
||||
btnClear.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClear.setOnAction(e -> {
|
||||
br.com.cybercore.signer.core.log.AppLogBuffer.clear();
|
||||
loadLogs();
|
||||
@@ -85,15 +85,18 @@ public final class LogsViewerDialog {
|
||||
|
||||
Button btnRefresh = new Button("Atualizar");
|
||||
btnRefresh.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnRefresh.setPrefWidth(100);
|
||||
btnRefresh.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnRefresh.setOnAction(e -> loadLogs());
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnClose.setPrefWidth(100);
|
||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
|
||||
footer.getChildren().addAll(btnCopy, btnClear, btnRefresh, btnClose);
|
||||
footer.getChildren().addAll(btnCopy, btnClear, btnRefresh, spacer, btnClose);
|
||||
|
||||
root.getChildren().addAll(header, txtLogs, footer);
|
||||
|
||||
@@ -101,6 +104,7 @@ public final class LogsViewerDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void loadLogs() {
|
||||
@@ -127,4 +131,8 @@ public final class LogsViewerDialog {
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -304,13 +304,12 @@ public final class PdfCertificateSignDialog {
|
||||
|
||||
btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(110);
|
||||
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> stage.close());
|
||||
|
||||
btnSign = new Button("Assinar Documento PDF");
|
||||
btnSign.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
||||
btnSign.setMinWidth(220);
|
||||
btnSign.setPrefWidth(Region.USE_COMPUTED_SIZE);
|
||||
btnSign.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnSign.setDefaultButton(true);
|
||||
btnSign.setOnAction(e -> handleSign());
|
||||
|
||||
@@ -318,9 +317,10 @@ public final class PdfCertificateSignDialog {
|
||||
|
||||
root.getChildren().addAll(header, summaryBox, certSection, footer);
|
||||
|
||||
Scene scene = new Scene(root, 720, 500);
|
||||
Scene scene = new Scene(root);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
|
||||
updatePinFieldVisibility();
|
||||
}
|
||||
|
||||
+10
-3
@@ -270,14 +270,13 @@ public final class PdfSignDialog {
|
||||
|
||||
btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(110);
|
||||
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> stage.close());
|
||||
|
||||
btnNextToCert = new Button("Avançar", SvgIcons.arrowRightIcon(12));
|
||||
btnNextToCert.setContentDisplay(javafx.scene.control.ContentDisplay.RIGHT);
|
||||
btnNextToCert.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
||||
btnNextToCert.setMinWidth(240);
|
||||
btnNextToCert.setPrefWidth(250);
|
||||
btnNextToCert.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnNextToCert.setDefaultButton(true);
|
||||
btnNextToCert.setOnAction(e -> handleAdvanceToCertificate());
|
||||
|
||||
@@ -291,6 +290,7 @@ public final class PdfSignDialog {
|
||||
Scene scene = new Scene(root, 1020, 680);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
|
||||
updateSealPreview();
|
||||
}
|
||||
@@ -429,6 +429,7 @@ public final class PdfSignDialog {
|
||||
|
||||
btnPrevPage = new Button("◀");
|
||||
btnPrevPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnPrevPage.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnPrevPage.setTooltip(new Tooltip("Página Anterior"));
|
||||
btnPrevPage.setDisable(true);
|
||||
btnPrevPage.setOnAction(e -> navigatePage(-1));
|
||||
@@ -438,6 +439,7 @@ public final class PdfSignDialog {
|
||||
|
||||
btnNextPage = new Button("▶");
|
||||
btnNextPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnNextPage.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnNextPage.setTooltip(new Tooltip("Próxima Página"));
|
||||
btnNextPage.setDisable(true);
|
||||
btnNextPage.setOnAction(e -> navigatePage(1));
|
||||
@@ -456,6 +458,7 @@ public final class PdfSignDialog {
|
||||
btnZoomOut = new Button();
|
||||
btnZoomOut.setGraphic(SvgIcons.zoomOutIcon(13));
|
||||
btnZoomOut.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnZoomOut.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnZoomOut.setTooltip(new Tooltip("Diminuir Zoom"));
|
||||
btnZoomOut.setOnAction(e -> adjustZoom(-ZOOM_STEP));
|
||||
|
||||
@@ -465,12 +468,14 @@ public final class PdfSignDialog {
|
||||
btnZoomIn = new Button();
|
||||
btnZoomIn.setGraphic(SvgIcons.zoomInIcon(13));
|
||||
btnZoomIn.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnZoomIn.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnZoomIn.setTooltip(new Tooltip("Aumentar Zoom"));
|
||||
btnZoomIn.setOnAction(e -> adjustZoom(ZOOM_STEP));
|
||||
|
||||
btnZoomFit = new Button("Ajustar");
|
||||
btnZoomFit.setGraphic(SvgIcons.zoomFitIcon(12));
|
||||
btnZoomFit.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnZoomFit.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnZoomFit.setTooltip(new Tooltip("Ajustar à janela"));
|
||||
btnZoomFit.setOnAction(e -> setZoom(1.0));
|
||||
|
||||
@@ -483,6 +488,7 @@ public final class PdfSignDialog {
|
||||
|
||||
btnToggleResize = new Button(" Redimensionar", SvgIcons.zoomFitIcon(13));
|
||||
btnToggleResize.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnToggleResize.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnToggleResize.setTooltip(new Tooltip("Ativar/desativar alça interativa para alterar o tamanho do selo"));
|
||||
btnToggleResize.setOnAction(e -> toggleResizeMode());
|
||||
|
||||
@@ -491,6 +497,7 @@ public final class PdfSignDialog {
|
||||
|
||||
btnResetSealScale = new Button(" 100%", SvgIcons.refreshIcon(12));
|
||||
btnResetSealScale.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnResetSealScale.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnResetSealScale.setTooltip(new Tooltip("Restaurar tamanho padrão original (100%)"));
|
||||
btnResetSealScale.setVisible(false);
|
||||
btnResetSealScale.setOnAction(e -> applySealScale(1.0));
|
||||
|
||||
+15
-2
@@ -383,24 +383,33 @@ public final class SealDesignerDialog {
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
footer.setPadding(new Insets(6, 0, 0, 0));
|
||||
|
||||
Region spacer = new Region();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().add("btn-secondary");
|
||||
btnCancel.getStyleClass().add("btn-ghost");
|
||||
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnCancel.setPrefHeight(34);
|
||||
btnCancel.setOnAction(e -> stage.close());
|
||||
|
||||
Button btnInstall = new Button("💾 Instalar Selo no Sistema");
|
||||
btnInstall.getStyleClass().add("btn-primary");
|
||||
btnInstall.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnInstall.setPrefHeight(34);
|
||||
btnInstall.setDefaultButton(true);
|
||||
btnInstall.setOnAction(e -> handleInstallSeal());
|
||||
|
||||
footer.getChildren().addAll(btnCancel, btnInstall);
|
||||
btnImport.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnExport.setMinWidth(Region.USE_PREF_SIZE);
|
||||
|
||||
footer.getChildren().addAll(spacer, btnCancel, btnInstall);
|
||||
|
||||
root.getChildren().addAll(header, mainSplit, footer);
|
||||
|
||||
Scene scene = new Scene(root, 880, 580);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void updatePreview() {
|
||||
@@ -640,4 +649,8 @@ public final class SealDesignerDialog {
|
||||
stage.centerOnScreen();
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-3
@@ -222,9 +222,8 @@ public final class SealManagementDialog {
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnClose.setPrefWidth(110);
|
||||
btnClose.setMinWidth(110);
|
||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
|
||||
footer.getChildren().add(btnClose);
|
||||
@@ -234,6 +233,7 @@ public final class SealManagementDialog {
|
||||
Scene scene = new Scene(root, 880, 560);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void refreshSealsList() {
|
||||
@@ -441,6 +441,10 @@ public final class SealManagementDialog {
|
||||
stage.showAndWait();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Célula customizada para a listagem visual dos selos.
|
||||
*/
|
||||
|
||||
+12
-4
@@ -66,7 +66,6 @@ public class SignaturePromptDialog {
|
||||
VBox root = new VBox(16);
|
||||
root.getStyleClass().add("dialog-container");
|
||||
root.setPadding(new Insets(20, 24, 20, 24));
|
||||
root.setPrefWidth(560);
|
||||
|
||||
HBox headerBox = new HBox(14);
|
||||
headerBox.setAlignment(Pos.CENTER_LEFT);
|
||||
@@ -240,14 +239,19 @@ public class SignaturePromptDialog {
|
||||
actionsRow.setPadding(new Insets(4, 0, 0, 0));
|
||||
|
||||
Button btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().add("btn-cancel");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> {
|
||||
approvalFuture.complete(false);
|
||||
stage.close();
|
||||
});
|
||||
|
||||
HBox spacer = new HBox();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnConfirm = new Button(isAuthentication ? "Confirmar e Entrar" : "Confirmar e Assinar");
|
||||
btnConfirm.getStyleClass().add("btn-primary");
|
||||
btnConfirm.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||
btnConfirm.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnConfirm.setDefaultButton(true);
|
||||
btnConfirm.setOnAction(e -> {
|
||||
if (isA3 && !isWindowsStore) {
|
||||
@@ -277,7 +281,7 @@ public class SignaturePromptDialog {
|
||||
stage.close();
|
||||
});
|
||||
|
||||
actionsRow.getChildren().addAll(btnCancel, btnConfirm);
|
||||
actionsRow.getChildren().addAll(btnCancel, spacer, btnConfirm);
|
||||
|
||||
if (isA3) {
|
||||
root.getChildren().addAll(headerBox, detailsBox, pinContainer, validationLabel, actionsRow);
|
||||
@@ -335,4 +339,8 @@ public class SignaturePromptDialog {
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+16
-2
@@ -19,6 +19,7 @@ import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Priority;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Modality;
|
||||
@@ -120,6 +121,7 @@ public final class SignatureValidationDialog {
|
||||
|
||||
Button btnBrowseSig = new Button("Procurar...");
|
||||
btnBrowseSig.getStyleClass().add("btn-secondary");
|
||||
btnBrowseSig.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnBrowseSig.setOnAction(e -> handleBrowseSig());
|
||||
|
||||
sigRow.getChildren().addAll(txtSigPath, btnBrowseSig);
|
||||
@@ -139,6 +141,7 @@ public final class SignatureValidationDialog {
|
||||
|
||||
Button btnBrowseDoc = new Button("Procurar...");
|
||||
btnBrowseDoc.getStyleClass().add("btn-secondary");
|
||||
btnBrowseDoc.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnBrowseDoc.setOnAction(e -> handleBrowseDoc());
|
||||
|
||||
docRow.getChildren().addAll(txtDocPath, btnBrowseDoc);
|
||||
@@ -161,28 +164,35 @@ public final class SignatureValidationDialog {
|
||||
|
||||
btnSaveExtracted = new Button("Salvar Conteúdo Extraído...");
|
||||
btnSaveExtracted.getStyleClass().add("btn-secondary");
|
||||
btnSaveExtracted.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnSaveExtracted.setVisible(false);
|
||||
btnSaveExtracted.setManaged(false);
|
||||
btnSaveExtracted.setOnAction(e -> handleSaveExtracted());
|
||||
|
||||
HBox.setHgrow(btnSaveExtracted, Priority.NEVER);
|
||||
|
||||
Region spacer = new Region();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
||||
Button btnClose = new Button("Fechar");
|
||||
btnClose.getStyleClass().add("btn-secondary");
|
||||
btnClose.getStyleClass().add("btn-ghost");
|
||||
btnClose.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
|
||||
Button btnValidate = new Button("Validar Agora");
|
||||
btnValidate.getStyleClass().add("btn-primary");
|
||||
btnValidate.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnValidate.setDefaultButton(true);
|
||||
btnValidate.setOnAction(e -> handleValidate());
|
||||
|
||||
footer.getChildren().addAll(btnSaveExtracted, btnClose, btnValidate);
|
||||
footer.getChildren().addAll(btnSaveExtracted, spacer, btnClose, btnValidate);
|
||||
|
||||
root.getChildren().addAll(header, typeBox, sigBox, docBox, scrollResult, footer);
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
|
||||
updateModeView();
|
||||
}
|
||||
@@ -382,4 +392,8 @@ public final class SignatureValidationDialog {
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-3
@@ -77,9 +77,8 @@ public final class TutorialDialog {
|
||||
HBox footer = new HBox();
|
||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||
Button btnClose = new Button(" Entendi", SvgIcons.closeIcon(13));
|
||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||
btnClose.setPrefWidth(110);
|
||||
btnClose.setMinWidth(110);
|
||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||
btnClose.setOnAction(e -> stage.close());
|
||||
footer.getChildren().add(btnClose);
|
||||
|
||||
@@ -89,6 +88,7 @@ public final class TutorialDialog {
|
||||
ThemeManager.applyTheme(scene);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
}
|
||||
|
||||
private void addStep(VBox container, String title, String description) {
|
||||
@@ -116,4 +116,8 @@ public final class TutorialDialog {
|
||||
public void show() {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +294,7 @@ public final class XmlSignDialog {
|
||||
|
||||
btnCancel = new Button("Cancelar");
|
||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||
btnCancel.setOnAction(e -> stage.close());
|
||||
|
||||
btnSign = new Button("Assinar Documento XML");
|
||||
@@ -309,6 +310,7 @@ public final class XmlSignDialog {
|
||||
Scene scene = new Scene(root);
|
||||
ThemeManager.applyTheme(scene);
|
||||
stage.setScene(scene);
|
||||
stage.sizeToScene();
|
||||
|
||||
updatePinFieldVisibility();
|
||||
}
|
||||
@@ -554,4 +556,8 @@ public final class XmlSignDialog {
|
||||
stage.show();
|
||||
stage.toFront();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return this.stage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user