diff --git a/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java b/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java index a639b54c8..64f054e57 100644 --- a/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java +++ b/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java @@ -344,20 +344,38 @@ public class AppMainWindow { stage.setHeight(state.windowHeight); } TrackEvent.debug("Window loaded saved bounds"); - } else if (!AppProperties.get().isShowcase()) { - if (AppDistributionType.get() == AppDistributionType.WEBTOP) { - stage.setWidth(1000); - stage.setHeight(600); - } else { - stage.setWidth(1280); - stage.setHeight(780); - } } else { + setDefaultSize(); + } + } + + private void setDefaultSize() { + if (AppProperties.get().isShowcase()) { stage.setX(312); stage.setY(149); stage.setWidth(1296); stage.setHeight(759); + return; } + + if (AppDistributionType.get() == AppDistributionType.WEBTOP) { + stage.setWidth(1000); + stage.setHeight(600); + } + + var screens = Screen.getScreens(); + if (screens.size() > 1) { + stage.setWidth(1280); + stage.setHeight(780); + return; + } + + var screen = screens.getFirst(); + var w = Math.min(stage.getWidth(), screen.getBounds().getWidth() - 10); + var h = Math.min(stage.getHeight(), screen.getBounds().getHeight() - 10); + stage.setWidth(w); + stage.setHeight(h); + } private void saveState() { diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java index b9707d9fd..fe24778df 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java @@ -512,6 +512,7 @@ public interface ExternalEditorType extends PrefsChoiceValue { new LinuxType("app.mousepad", "mousepad", "https://docs.xfce.org/apps/mousepad/start", "org.xfce.mousepad"); LinuxPathType PLUMA = new LinuxPathType("app.pluma", "pluma", "https://github.com/mate-desktop/pluma"); + LinuxPathType WESTON_EDITOR = new LinuxPathType("app.westonEditor", "weston-editor", "https://wayland.pages.freedesktop.org/weston/"); ExternalEditorType TEXT_EDIT = new MacOsEditor("app.textEdit", "TextEdit", "https://support.apple.com/en-gb/guide/textedit/welcome/mac"); ExternalEditorType BBEDIT = new MacOsEditor("app.bbedit", "BBEdit", "https://www.barebones.com/products/bbedit/"); @@ -606,6 +607,7 @@ public interface ExternalEditorType extends PrefsChoiceValue { LEAFPAD, MOUSEPAD, GNOME, + ExternalEditorType.WESTON_EDITOR, ExternalEditorType.CURSOR_LINUX); List MACOS_EDITORS = List.of( VOID_MACOS, diff --git a/lang/strings/fixed_en.properties b/lang/strings/fixed_en.properties index 89519dc8e..8f45b1852 100644 --- a/lang/strings/fixed_en.properties +++ b/lang/strings/fixed_en.properties @@ -153,3 +153,4 @@ antigravity=Antigravity rsa=RSA ed25519=ED25519 ed25519Sk=ED25519 (FIDO2) +westonEditor=Weston Editor