From 96b3ee8e540e9b3dbab220cbbb81683767cc6f0c Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 28 Feb 2024 06:28:35 +0000 Subject: [PATCH] Various fixes --- app/src/main/java/io/xpipe/app/util/FileOpener.java | 6 +++++- app/src/main/java/io/xpipe/app/util/TerminalLauncher.java | 6 +++++- .../resources/io/xpipe/app/resources/style/header-bars.css | 7 ++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/FileOpener.java b/app/src/main/java/io/xpipe/app/util/FileOpener.java index fd0062149..54eec2a4a 100644 --- a/app/src/main/java/io/xpipe/app/util/FileOpener.java +++ b/app/src/main/java/io/xpipe/app/util/FileOpener.java @@ -71,7 +71,11 @@ public class FileOpener { try { editor.launch(Path.of(localFile).toRealPath()); } catch (Exception e) { - ErrorEvent.fromThrowable(e).expected().handle(); + ErrorEvent.fromThrowable(e) + .description("Unable to launch editor " + editor.toTranslatedString().getValue() + + ".\nMaybe try to use a different editor in the settings.") + .expected() + .handle(); } } diff --git a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java index bb7503443..6550853ed 100644 --- a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java +++ b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java @@ -10,6 +10,7 @@ import io.xpipe.core.process.ProcessControl; import io.xpipe.core.process.ShellControl; import io.xpipe.core.process.TerminalInitScriptConfig; +import java.io.IOException; import java.util.UUID; public class TerminalLauncher { @@ -55,7 +56,10 @@ public class TerminalLauncher { type.launch(config); latch.await(); } catch (Exception ex) { - throw ErrorEvent.unreportable(ex); + ErrorEvent.unreportable(new IOException( + "Unable to launch terminal " + type.toTranslatedString().getValue() + ": " + ex.getMessage() + + ".\nMaybe try to use a different terminal in the settings.", + ex)); } } } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/header-bars.css b/app/src/main/resources/io/xpipe/app/resources/style/header-bars.css index b7d6a6340..661f01e98 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/header-bars.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/header-bars.css @@ -3,7 +3,10 @@ -fx-padding: 0.8em 1.0em 0.8em 1.0em; -fx-background-color: -color-bg-subtle; -fx-border-color: -color-border-default; --fx-effect: dropshadow(three-pass-box, -color-shadow-default, 3px, 0.5, 0, 1); +} + +.root:pretty .bar { + -fx-effect: dropshadow(three-pass-box, -color-shadow-default, 3px, 0.5, 0, 1); } .store-header-bar { @@ -102,10 +105,8 @@ -fx-padding: 0.8em 0.5em 0.8em 0.5em; -fx-background-color: -color-bg-subtle; -fx-border-color: -color-border-default; --fx-effect: dropshadow(three-pass-box, -color-shadow-default, 3px, 0.5, 0, 1); } - .store-sort-bar { -fx-background-radius: 0 4px 4px 0; -fx-border-radius: 0 4px 4px 0;