mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Various small fixes
This commit is contained in:
parent
fbaa461156
commit
b32f58b0ae
12 changed files with 99 additions and 118 deletions
|
@ -10,7 +10,7 @@ import io.xpipe.app.storage.DataColor;
|
|||
public final class BrowserHistoryTabModel extends BrowserSessionTab {
|
||||
|
||||
public BrowserHistoryTabModel(BrowserAbstractSessionModel<?> browserModel) {
|
||||
super(browserModel, AppI18n.get("history"));
|
||||
super(browserModel, " " + AppI18n.get("history") + " ");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -88,11 +88,7 @@ public class ModifiedStage extends Stage {
|
|||
NativeWinWindowControl.DmwaWindowAttribute.DWMWA_USE_IMMERSIVE_DARK_MODE.get(),
|
||||
AppPrefs.get().theme.getValue().isDark());
|
||||
boolean seamlessFrame;
|
||||
if (AppPrefs.get().performanceMode().get() || !mergeFrame()) {
|
||||
seamlessFrame = false;
|
||||
} else {
|
||||
seamlessFrame = ctrl.setWindowBackdrop(NativeWinWindowControl.DwmSystemBackDropType.MICA_ALT);
|
||||
}
|
||||
seamlessFrame = ctrl.setWindowBackdrop(NativeWinWindowControl.DwmSystemBackDropType.MICA_ALT) || true;
|
||||
stage.getScene()
|
||||
.getRoot()
|
||||
.pseudoClassStateChanged(PseudoClass.getPseudoClass("seamless-frame"), seamlessFrame);
|
||||
|
|
|
@ -227,7 +227,6 @@ public class AppPrefs {
|
|||
new RdpCategory(),
|
||||
new SshCategory(),
|
||||
new LocalShellCategory(),
|
||||
new LoggingCategory(),
|
||||
new ConnectionsCategory(),
|
||||
new FileBrowserCategory(),
|
||||
new SecurityCategory(),
|
||||
|
|
|
@ -23,7 +23,7 @@ public class AppPrefsComp extends SimpleComp {
|
|||
return appPrefsCategory
|
||||
.create()
|
||||
.maxWidth(700)
|
||||
.padding(new Insets(40, 40, 20, 40))
|
||||
.padding(new Insets(40, 40, 20, 60))
|
||||
.styleClass("prefs-container")
|
||||
.createRegion();
|
||||
}));
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package io.xpipe.app.prefs;
|
||||
|
||||
import io.xpipe.app.comp.Comp;
|
||||
import io.xpipe.app.comp.base.ButtonComp;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.util.DesktopHelper;
|
||||
import io.xpipe.app.util.OptionsBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
||||
public class LoggingCategory extends AppPrefsCategory {
|
||||
|
||||
@Override
|
||||
protected String getId() {
|
||||
return "logging";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Comp<?> create() {
|
||||
var prefs = AppPrefs.get();
|
||||
return new OptionsBuilder()
|
||||
.addTitle("sessionLogging")
|
||||
.sub(new OptionsBuilder()
|
||||
.pref(prefs.enableTerminalLogging)
|
||||
.addToggle(prefs.enableTerminalLogging)
|
||||
.nameAndDescription("terminalLoggingDirectory")
|
||||
.addComp(new ButtonComp(AppI18n.observable("openSessionLogs"), () -> {
|
||||
var dir = AppProperties.get().getDataDir().resolve("sessions");
|
||||
try {
|
||||
Files.createDirectories(dir);
|
||||
DesktopHelper.browsePathLocal(dir);
|
||||
} catch (IOException e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
})
|
||||
.disable(prefs.enableTerminalLogging.not())))
|
||||
.buildComp();
|
||||
}
|
||||
}
|
|
@ -7,8 +7,10 @@ import io.xpipe.app.comp.base.HorizontalComp;
|
|||
import io.xpipe.app.comp.base.StackComp;
|
||||
import io.xpipe.app.comp.base.TextFieldComp;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.ext.PrefsChoiceValue;
|
||||
import io.xpipe.app.ext.ProcessControlProvider;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.terminal.ExternalTerminalType;
|
||||
import io.xpipe.app.terminal.TerminalLauncher;
|
||||
import io.xpipe.app.terminal.TerminalView;
|
||||
|
@ -23,6 +25,8 @@ import javafx.scene.paint.Color;
|
|||
|
||||
import org.kordamp.ikonli.javafx.FontIcon;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -64,6 +68,21 @@ public class TerminalCategory extends AppPrefsCategory {
|
|||
.addComp(terminalTest)
|
||||
.pref(prefs.clearTerminalOnInit)
|
||||
.addToggle(prefs.clearTerminalOnInit))
|
||||
.addTitle("sessionLogging")
|
||||
.sub(new OptionsBuilder()
|
||||
.pref(prefs.enableTerminalLogging)
|
||||
.addToggle(prefs.enableTerminalLogging)
|
||||
.nameAndDescription("terminalLoggingDirectory")
|
||||
.addComp(new ButtonComp(AppI18n.observable("openSessionLogs"), () -> {
|
||||
var dir = AppProperties.get().getDataDir().resolve("sessions");
|
||||
try {
|
||||
Files.createDirectories(dir);
|
||||
DesktopHelper.browsePathLocal(dir);
|
||||
} catch (IOException e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
})
|
||||
.disable(prefs.enableTerminalLogging.not())))
|
||||
.buildComp();
|
||||
}
|
||||
|
||||
|
|
|
@ -919,7 +919,8 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
|||
MOBAXTERM,
|
||||
SECURECRT,
|
||||
TERMIUS,
|
||||
XSHELL);
|
||||
XSHELL,
|
||||
TabbyTerminalType.TABBY_WINDOWS);
|
||||
List<ExternalTerminalType> LINUX_TERMINALS = List.of(
|
||||
AlacrittyTerminalType.ALACRITTY_LINUX,
|
||||
WezTerminalType.WEZTERM_LINUX,
|
||||
|
|
|
@ -24,11 +24,6 @@ public interface TabbyTerminalType extends ExternalTerminalType, TrackableTermin
|
|||
return "https://tabby.sh";
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean isRecommended() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean supportsColoredTitle() {
|
||||
return true;
|
||||
|
@ -61,6 +56,11 @@ public interface TabbyTerminalType extends ExternalTerminalType, TrackableTermin
|
|||
super("app.tabby", "Tabby.exe");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecommended() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(Path file, LaunchConfiguration configuration) throws Exception {
|
||||
// Tabby has a very weird handling of output, even detaching with start does not prevent it from printing
|
||||
|
@ -109,6 +109,11 @@ public interface TabbyTerminalType extends ExternalTerminalType, TrackableTermin
|
|||
|
||||
class MacOs extends MacOsType implements TabbyTerminalType {
|
||||
|
||||
@Override
|
||||
public boolean isRecommended() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public MacOs() {
|
||||
super("app.tabby", "Tabby");
|
||||
}
|
||||
|
|
|
@ -330,10 +330,6 @@
|
|||
-fx-background-radius: 4;
|
||||
}
|
||||
|
||||
.browser .tab-label:static {
|
||||
-fx-padding: 0.4em 0.9em 0.4em 0.7em;
|
||||
}
|
||||
|
||||
.browser .tab {
|
||||
-fx-opacity: 0.6;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
.root:macos:seamless-frame {
|
||||
-fx-padding: 0 0 27 0;
|
||||
}
|
||||
|
||||
.root:dark:separate-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default, -3%);
|
||||
}
|
||||
|
||||
.root:light:separate-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default, -9%);
|
||||
}
|
||||
|
||||
.root:dark:separate-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default, -3%);
|
||||
}
|
||||
|
||||
.root:light:separate-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default, -9%);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.root:dark:seamless-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, 1%);
|
||||
}
|
||||
|
||||
.root:light:seamless-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, -9%);
|
||||
}
|
||||
|
||||
.root:dark:seamless-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, 1%);
|
||||
}
|
||||
|
||||
.root:light:seamless-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, -9%);
|
||||
}
|
||||
|
||||
.root:seamless-frame.layout > .background {
|
||||
-fx-background-radius: 0 6 0 0;
|
||||
-fx-border-radius: 0 6 0 0;
|
||||
-fx-border-width: 1 1 0 0;
|
||||
-fx-padding: 0 0 0 0;
|
||||
}
|
||||
|
||||
.root:light:seamless-frame.layout > .background {
|
||||
-fx-border-color: #999;
|
||||
}
|
||||
|
||||
.root:dark:seamless-frame.layout > .background {
|
||||
-fx-border-color: -color-border-default;
|
||||
}
|
||||
|
||||
.root:macos:seamless-frame.layout > .background {
|
||||
-fx-background-insets: 0;
|
||||
-fx-border-insets: 0;
|
||||
}
|
||||
|
||||
.root:seamless-frame.layout > .background > * {
|
||||
-fx-background-radius: 0 6 0 0;
|
||||
-fx-border-radius: 0 6 0 0;
|
||||
}
|
|
@ -9,6 +9,9 @@
|
|||
|
||||
.store-list-comp.scroll-pane .scroll-bar:vertical {
|
||||
-fx-padding: 9 1 5 1;
|
||||
-fx-min-width: 6px;
|
||||
-fx-pref-width: 6px;
|
||||
-fx-max-width: 6px;
|
||||
}
|
||||
|
||||
/* Grid */
|
||||
|
|
|
@ -9,64 +9,6 @@
|
|||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.root:macos:seamless-frame {
|
||||
-fx-padding: 0 0 27 0;
|
||||
}
|
||||
|
||||
.root:dark:separate-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default, -3%);
|
||||
}
|
||||
|
||||
.root:light:separate-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default, -9%);
|
||||
}
|
||||
|
||||
.root:dark:separate-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default, -3%);
|
||||
}
|
||||
|
||||
.root:light:separate-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default, -9%);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.root:dark:seamless-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, 1%);
|
||||
}
|
||||
|
||||
.root:light:seamless-frame .background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, -9%);
|
||||
}
|
||||
|
||||
.root:dark:seamless-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, 1%);
|
||||
}
|
||||
|
||||
.root:light:seamless-frame.background {
|
||||
-fx-background-color: derive(-color-bg-default-transparent, -9%);
|
||||
}
|
||||
|
||||
.root:seamless-frame.layout > .background {
|
||||
-fx-background-insets: 5 0 0 0;
|
||||
-fx-border-insets: 5 0 0 0;
|
||||
-fx-background-radius: 0 6 0 0;
|
||||
-fx-border-radius: 0 6 0 0;
|
||||
-fx-border-width: 1 1 0 0;
|
||||
-fx-border-color: -color-border-default;
|
||||
-fx-padding: 0 0 0 0;
|
||||
}
|
||||
|
||||
.root:macos:seamless-frame.layout > .background {
|
||||
-fx-background-insets: 0;
|
||||
-fx-border-insets: 0;
|
||||
}
|
||||
|
||||
.root:seamless-frame.layout > .background > * {
|
||||
-fx-background-radius: 0 6 0 0;
|
||||
-fx-border-radius: 0 6 0 0;
|
||||
}
|
||||
|
||||
.store-layout .split-pane-divider {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue