From 47bfbcbce5a79a6115e66c707303a7977183fc47 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 13 Jul 2024 13:09:43 +0000 Subject: [PATCH] Various fixes --- .../app/browser/BrowserBookmarkHeaderComp.java | 10 ++++++++-- .../xpipe/app/browser/fs/OpenFileSystemComp.java | 2 ++ .../browser/session/BrowserSessionTabsComp.java | 16 +++++++++------- .../io/xpipe/app/resources/style/bookmark.css | 2 +- .../io/xpipe/app/resources/style/browser.css | 2 +- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java index 2c59091b1..8aaef604c 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java @@ -2,6 +2,7 @@ package io.xpipe.app.browser; import io.xpipe.app.comp.store.StoreCategoryWrapper; import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.core.AppFont; import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.impl.FilterComp; import io.xpipe.app.fxcomps.impl.HorizontalComp; @@ -30,8 +31,13 @@ public final class BrowserBookmarkHeaderComp extends SimpleComp { StoreViewState.get().getAllConnectionsCategory(), StoreViewState.get().getActiveCategory(), this.category) - .styleClass(Styles.LEFT_PILL); - var filter = new FilterComp(this.filter).styleClass(Styles.RIGHT_PILL).minWidth(0).hgrow(); + .styleClass(Styles.LEFT_PILL) + .apply(struc -> { + AppFont.medium(struc.get()); + }); + var filter = new FilterComp(this.filter).styleClass(Styles.RIGHT_PILL).minWidth(0).hgrow().apply(struc -> { + AppFont.medium(struc.get()); + }); var top = new HorizontalComp(List.of(category, filter)) .apply(struc -> struc.get().setFillHeight(true)) diff --git a/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java b/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java index 526699132..93f4c60b1 100644 --- a/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java +++ b/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java @@ -9,6 +9,7 @@ import io.xpipe.app.browser.file.BrowserContextMenu; import io.xpipe.app.browser.file.BrowserFileListComp; import io.xpipe.app.comp.base.ModalOverlayComp; import io.xpipe.app.comp.base.MultiContentComp; +import io.xpipe.app.core.AppFont; import io.xpipe.app.fxcomps.Comp; import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.SimpleCompStructure; @@ -88,6 +89,7 @@ public class OpenFileSystemComp extends SimpleComp { topBar.setAlignment(Pos.CENTER); topBar.getStyleClass().add("top-bar"); var navBar = new BrowserNavBar(model).createStructure(); + AppFont.medium(navBar.get()); topBar.getChildren() .setAll( overview, 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 d2b6ae678..3809c2341 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 @@ -30,6 +30,7 @@ import javafx.scene.layout.Region; import javafx.scene.layout.StackPane; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.UUID; @@ -48,17 +49,18 @@ public class BrowserSessionTabsComp extends SimpleComp { } public Region createSimple() { - var multi = new MultiContentComp(Map., ObservableValue>of( - Comp.of(() -> createTabPane()), - Bindings.isNotEmpty(model.getSessionEntries()), - new BrowserWelcomeComp(model).apply(struc -> StackPane.setAlignment(struc.get(), Pos.CENTER_LEFT)), + var map = new LinkedHashMap, ObservableValue>(); + map.put(Comp.hspacer().styleClass("top-spacer"), + new SimpleBooleanProperty(true)); + map.put(Comp.of(() -> createTabPane()), + Bindings.isNotEmpty(model.getSessionEntries())); + map.put(new BrowserWelcomeComp(model).apply(struc -> StackPane.setAlignment(struc.get(), Pos.CENTER_LEFT)), Bindings.createBooleanBinding( () -> { return model.getSessionEntries().size() == 0; }, - model.getSessionEntries()), - Comp.hspacer().styleClass("top-spacer"), - new SimpleBooleanProperty(true))); + model.getSessionEntries())); + var multi = new MultiContentComp(map); 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/bookmark.css b/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css index 068cb1a08..d6d7fc33d 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css @@ -36,5 +36,5 @@ -fx-min-height: 3.5em; -fx-pref-height: 3.5em; -fx-max-height: 3.5em; - -fx-padding: 9 6 9 8; + -fx-padding: 10 6 10 8; } 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 f349e7241..a91d22222 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 @@ -166,7 +166,7 @@ } .browser .path-text, .browser .browser-filter .text-field { - -fx-padding: 6 12; + -fx-padding: 5 12; } .browser .path-text:invisible {