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