From 5e8ddb881d7f0b8fd5216bd6badd73265971dcfc Mon Sep 17 00:00:00 2001 From: crschnick Date: Fri, 5 Jul 2024 19:43:40 +0000 Subject: [PATCH] Style fixes --- .../browser/session/BrowserSessionTabsComp.java | 3 +++ .../io/xpipe/app/resources/style/browser.css | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/session/BrowserSessionTabsComp.java b/app/src/main/java/io/xpipe/app/browser/session/BrowserSessionTabsComp.java index 315886dda..23d8d102f 100644 --- a/app/src/main/java/io/xpipe/app/browser/session/BrowserSessionTabsComp.java +++ b/app/src/main/java/io/xpipe/app/browser/session/BrowserSessionTabsComp.java @@ -51,6 +51,8 @@ public class BrowserSessionTabsComp extends SimpleComp { public Region createSimple() { var multi = new MultiContentComp(Map., ObservableValue>of( + Comp.hspacer().styleClass("top-spacer"), + new SimpleBooleanProperty(true), Comp.of(() -> createTabPane()), Bindings.isNotEmpty(model.getSessionEntries()), new BrowserWelcomeComp(model).apply(struc -> StackPane.setAlignment(struc.get(), Pos.CENTER_LEFT)), @@ -59,6 +61,7 @@ public class BrowserSessionTabsComp extends SimpleComp { return model.getSessionEntries().size() == 0; }, model.getSessionEntries()))); + multi.apply(struc -> ((StackPane) struc.get()).setAlignment(Pos.TOP_CENTER)); return multi.createRegion(); } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/browser.css b/app/src/main/resources/io/xpipe/app/resources/style/browser.css index c7a2f25c8..a5a5700a5 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/browser.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/browser.css @@ -50,15 +50,16 @@ -fx-opacity: 1.0; } -.browser .welcome { - -fx-border-color: -color-bg-inset, -color-border-default; - -fx-border-width: 2.65em 10 0 0, 0.05em 0 0 0; - -fx-border-insets: 0, 2.65em 0 0 0; - -fx-border-radius: 0 10 0 0, 0; +.browser .top-spacer { + -fx-background-color: -color-bg-inset; + -fx-border-width: 0 0 0.05em 0; + -fx-border-color: -color-border-default; + -fx-pref-height: 2.65em; + -fx-max-height: 2.65em; } -.root:seamless-frame .browser .welcome { - -fx-background-radius: 0 10 0 0, 0, 0; +.root:seamless-frame .browser .top-spacer { + -fx-background-radius: 0 10 0 0; } .browser .welcome .button:hover {