Style fixes

This commit is contained in:
crschnick 2024-04-25 08:37:15 +00:00
parent 8199800a4b
commit 88f3be6525
8 changed files with 35 additions and 25 deletions

View file

@ -84,11 +84,12 @@ public final class BrowserBookmarkComp extends SimpleComp {
StoreViewState.get().getAllConnectionsCategory(),
StoreViewState.get().getActiveCategory(),
selectedCategory)
.styleClass(Styles.LEFT_PILL);
.styleClass(Styles.LEFT_PILL)
.minWidth(Region.USE_PREF_SIZE);
var filter =
new FilterComp(filterText).styleClass(Styles.RIGHT_PILL).hgrow().apply(struc -> {});
new FilterComp(filterText).hgrow();
var top = new HorizontalComp(List.of(category.minWidth(Region.USE_PREF_SIZE), filter.hgrow()))
var top = new HorizontalComp(List.of(category, filter))
.styleClass("categories")
.apply(struc -> {
AppFont.medium(struc.get());

View file

@ -1,5 +1,6 @@
package io.xpipe.app.browser;
import atlantafx.base.theme.Styles;
import io.xpipe.app.browser.session.BrowserSessionModel;
import io.xpipe.app.comp.base.ButtonComp;
import io.xpipe.app.comp.base.ListBoxViewComp;
@ -98,7 +99,7 @@ public class BrowserWelcomeComp extends SimpleComp {
var disable = new SimpleBooleanProperty();
var entryButton = entryButton(e, disable);
var dirButton = dirButton(e, disable);
return new HorizontalComp(List.of(entryButton, dirButton)).apply(struc -> {
return new HorizontalComp(List.of(entryButton, dirButton, Comp.hspacer(10))).apply(struc -> {
((Region) struc.get().getChildren().get(0))
.prefHeightProperty()
.bind(struc.get().heightProperty());
@ -138,8 +139,7 @@ public class BrowserWelcomeComp extends SimpleComp {
private Comp<?> entryButton(BrowserSavedState.Entry e, BooleanProperty disable) {
var entry = DataStorage.get().getStoreEntryIfPresent(e.getUuid());
var graphic =
entry.get().getProvider().getDisplayIconFileName(entry.get().getStore());
var graphic = entry.get().getProvider().getDisplayIconFileName(entry.get().getStore());
var view = PrettyImageHelper.ofFixedSize(graphic, 30, 24);
return new ButtonComp(
new SimpleStringProperty(DataStorage.get().getStoreDisplayName(entry.get())),
@ -153,11 +153,11 @@ public class BrowserWelcomeComp extends SimpleComp {
.accessibleText(DataStorage.get().getStoreDisplayName(entry.get()))
.disable(disable)
.styleClass("entry-button")
.styleClass(Styles.LEFT_PILL)
.apply(struc -> struc.get().setAlignment(Pos.CENTER_LEFT));
}
private Comp<?> dirButton(BrowserSavedState.Entry e, BooleanProperty disable) {
var entry = DataStorage.get().getStoreEntryIfPresent(e.getUuid());
return new ButtonComp(new SimpleStringProperty(e.getPath()), null, () -> {
ThreadHelper.runAsync(() -> {
model.restoreStateAsync(e, disable);
@ -167,6 +167,7 @@ public class BrowserWelcomeComp extends SimpleComp {
.disable(disable)
.styleClass("directory-button")
.apply(struc -> struc.get().setMaxWidth(2000))
.styleClass(Styles.RIGHT_PILL)
.grow(true, false)
.apply(struc -> struc.get().setAlignment(Pos.CENTER_LEFT));
}

View file

@ -62,6 +62,7 @@ public class FilterComp extends Comp<FilterComp.Structure> {
var stack = new StackPane(bgLabel, filter);
stack.getStyleClass().add("filter-comp");
stack.minWidthProperty().bind(bgLabel.prefWidthProperty());
return Structure.builder()
.inactiveIcon(fi)

View file

@ -5,6 +5,7 @@ import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.update.XPipeDistributionType;
import io.xpipe.app.util.Hyperlinks;
import io.xpipe.app.util.ThreadHelper;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
@ -67,6 +68,10 @@ public class TerminalErrorHandler extends GuiErrorHandlerBase implements ErrorHa
}
private void handleProbableUpdate() {
if (AppProperties.get().isDevelopmentEnvironment()) {
return;
}
try {
var rel = XPipeDistributionType.get().getUpdateHandler().refreshUpdateCheck();
if (rel != null && rel.isUpdate()) {
@ -86,6 +91,7 @@ public class TerminalErrorHandler extends GuiErrorHandlerBase implements ErrorHa
.orElse(false);
if (update) {
Hyperlinks.open(rel.getReleaseUrl());
ThreadHelper.sleep(1000);
}
}
} catch (Throwable t) {

View file

@ -6,6 +6,12 @@
-fx-border-width: 0 0 1 0;
}
.root.nord .bookmark-list .filter-comp {
-fx-border-radius: 0;
-fx-background-radius: 0;
}
.bookmark-list .filter-comp {
-fx-border-width: 1;
-fx-border-radius: 0 4px 4px 0;

View file

@ -28,14 +28,6 @@
-fx-opacity: 1.0;
}
.browser .welcome .entry-button {
-fx-background-radius: 4px 0 0 4px;
}
.browser .welcome .directory-button {
-fx-background-radius: 0 4px 4px 0;
}
.browser .welcome .button:hover {
-fx-background-color: -color-neutral-muted;
}
@ -223,6 +215,11 @@
-fx-opacity: 1.0;
}
.root.nord .browser .tab-container {
-fx-border-radius: 0;
-fx-background-radius: 0;
}
.browser .quick-access-button {
-fx-border-radius: 0;
-fx-background-radius: 0;

View file

@ -134,11 +134,6 @@
-fx-spacing: 0.2em;
}
.store-entry-section-comp.none {
-fx-background-color: -color-bg-default;
-fx-border-color: -color-border-default;
}
/* Light sub backgrounds */
.root:light .store-entry-section-comp:sub:expanded {

View file

@ -90,18 +90,21 @@
-fx-pref-height: 1;
}
.root:light .store-section-mini-comp:top {
-fx-background-color: #9991;
.root:light .store-section-mini-comp:sub:expanded {
-fx-border-color: #9999;
}
.root:dark .store-section-mini-comp:top {
-fx-background-color: #0001;
.root:dark .store-section-mini-comp:sub:expanded {
-fx-border-color: #4449;
}
.root.nord .store-section-mini-comp:sub:expanded {
-fx-border-radius: 0;
}
.store-section-mini-comp:sub:expanded {
-fx-border-radius: 4 0 0 4;
-fx-border-width: 1px 0 1px 1px;
-fx-border-color: -color-border-default;
}
.store-section-mini-comp:root {