From 21b7e063aa6900a4b1c000e35978e079fd1d0997 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sun, 14 Jul 2024 08:19:00 +0000 Subject: [PATCH] Small fixes --- .../java/io/xpipe/app/browser/BrowserStatusBarComp.java | 2 +- .../java/io/xpipe/app/comp/store/StoreCategoryWrapper.java | 5 +++++ app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java | 2 +- app/src/main/java/io/xpipe/app/prefs/VaultCategory.java | 6 +++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java index 88a2b08c5..f326e635e 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java @@ -32,9 +32,9 @@ public class BrowserStatusBarComp extends SimpleComp { @Override protected Region createSimple() { var bar = new HorizontalComp(List.of( - createProgressEstimateStatus(), createProgressNameStatus(), createProgressStatus(), + createProgressEstimateStatus(), Comp.hspacer(), createClipboardStatus(), createSelectionStatus() diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java index c5ad100c6..414e8ac48 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java @@ -112,6 +112,11 @@ public class StoreCategoryWrapper { } public void update() { + // We are probably in shutdown then + if (StoreViewState.get() == null) { + return; + } + // Avoid reupdating name when changed from the name property! var catName = translatedName(category.getName()); if (!catName.equals(name.getValue())) { diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java index f10f1de61..34a8ca7e2 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java @@ -39,7 +39,7 @@ public class FilterComp extends Comp> { filter.getStyleClass().add("filter-comp"); filter.promptTextProperty().bind(AppI18n.observable("searchFilter")); filter.rightProperty().bind(Bindings.createObjectBinding(() -> { - return filter.isFocused() ? clear : fi; + return filter.isFocused() || (filter.getText() != null && !filter.getText().isEmpty()) ? clear : fi; }, filter.focusedProperty())); filter.setAccessibleText("Filter"); diff --git a/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java b/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java index 86e98c7d4..cba1d6179 100644 --- a/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java @@ -36,8 +36,6 @@ public class VaultCategory extends AppPrefsCategory { } builder.addTitle("vaultSecurity") .sub(new OptionsBuilder() - .nameAndDescription("encryptAllVaultData") - .addToggle(prefs.encryptAllVaultData) .nameAndDescription("workspaceLock") .addComp( new ButtonComp( @@ -57,7 +55,9 @@ public class VaultCategory extends AppPrefsCategory { .addToggle(prefs.lockVaultOnHibernation) .hide(prefs.getLockCrypt() .isNull() - .or(prefs.getLockCrypt().isEmpty()))); + .or(prefs.getLockCrypt().isEmpty())) + .nameAndDescription("encryptAllVaultData") + .addToggle(prefs.encryptAllVaultData)); return builder.buildComp(); } }