mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-24 00:53:02 +12:00
Improve error overlay styling
This commit is contained in:
parent
3848fb9d93
commit
096666e345
|
@ -3,6 +3,7 @@ package io.xpipe.app.comp.base;
|
|||
import atlantafx.base.controls.ModalPane;
|
||||
import atlantafx.base.layout.ModalBox;
|
||||
import atlantafx.base.theme.Styles;
|
||||
import io.xpipe.app.core.AppFont;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.fxcomps.Comp;
|
||||
import io.xpipe.app.fxcomps.SimpleComp;
|
||||
|
@ -16,7 +17,9 @@ import javafx.scene.control.Label;
|
|||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
import lombok.Value;
|
||||
import org.kordamp.ikonli.javafx.FontIcon;
|
||||
|
||||
public class ModalOverlayComp extends SimpleComp {
|
||||
|
||||
|
@ -42,11 +45,15 @@ public class ModalOverlayComp extends SimpleComp {
|
|||
}
|
||||
|
||||
if (newValue != null) {
|
||||
var l = new Label(AppI18n.get(newValue.titleKey));
|
||||
var graphic = new FontIcon("mdomz-warning");
|
||||
graphic.setIconColor(Color.RED);
|
||||
var l = new Label(AppI18n.get(newValue.titleKey), graphic);
|
||||
l.setGraphicTextGap(6);
|
||||
AppFont.normal(l);
|
||||
var r = newValue.content.createRegion();
|
||||
var box = new VBox(l, r);
|
||||
box.setSpacing(15);
|
||||
box.setPadding(new Insets(15));
|
||||
box.setSpacing(10);
|
||||
box.setPadding(new Insets(10, 15, 15, 15));
|
||||
|
||||
if (newValue.finishKey != null) {
|
||||
var finishButton = new Button(AppI18n.get(newValue.finishKey));
|
||||
|
|
|
@ -138,7 +138,7 @@ test=Test
|
|||
lockCreationAlertTitle=Set passphrase
|
||||
lockCreationAlertHeader=Set your new master passphrase
|
||||
finish=Finish
|
||||
error=Error
|
||||
error=An error occurred
|
||||
downloadStageDescription=Downloads files to your local machine, so you can drag and drop them into your native desktop environment.
|
||||
ok=Ok
|
||||
search=Search
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
.error-overlay-comp {
|
||||
-fx-padding: 1.0em;
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-radius: 2px;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.modal-overlay-comp .titled-pane {
|
||||
-fx-padding: 0;
|
||||
-fx-border-radius: 0;
|
||||
.modal-overlay-comp .modal-box {
|
||||
-fx-border-radius: 4;
|
||||
-fx-background-radius: 6;
|
||||
}
|
||||
|
||||
.modal-overlay-comp {
|
||||
|
|
Loading…
Reference in a new issue