Various small fixes

This commit is contained in:
crschnick 2024-11-12 07:42:01 +00:00
parent fbaa461156
commit b32f58b0ae
12 changed files with 99 additions and 118 deletions

View file

@ -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

View file

@ -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);

View file

@ -227,7 +227,6 @@ public class AppPrefs {
new RdpCategory(),
new SshCategory(),
new LocalShellCategory(),
new LoggingCategory(),
new ConnectionsCategory(),
new FileBrowserCategory(),
new SecurityCategory(),

View file

@ -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();
}));

View file

@ -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();
}
}

View file

@ -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();
}

View file

@ -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,

View file

@ -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");
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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;
}