fix(studio): larger default window — 1440x900 across all platforms
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
Stefan observed the default Studio window opened smaller than comfortable when launched fresh (no persisted size). On macOS specifically the xib-stored default was around 800x600 — too tight to read the sidebar + content + run panel side-by-side. Set 1440x900 as the initial content size across all three host platforms: - macOS: MainFlutterWindow.swift sets contentSize via NSWindow.setContentSize after the FlutterViewController attaches, and centers on the active NSScreen. Clamped to the screen's visibleFrame so we never open larger than the display (matters for non-Retina external monitors). - Linux: gtk_window_set_default_size 1280x720 -> 1440x900 - Windows: Win32Window::Size 1280x720 -> 1440x900 1440x900 is the effective Retina resolution of a 13" MacBook (Stefan's dev machine) and the smallest "modern desktop" footprint that lets the sidebar + content + tool panel breathe. Version 0.51.8 -> 0.51.9. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
b40da56b8d
commit
3097a30428
5 changed files with 19 additions and 6 deletions
|
|
@ -27,7 +27,7 @@ import 'widgets/widgets.dart';
|
||||||
/// Studio's own build version. Bump on every UI commit so the
|
/// Studio's own build version. Bump on every UI commit so the
|
||||||
/// running app self-identifies — visible in the sidebar header
|
/// running app self-identifies — visible in the sidebar header
|
||||||
/// and quick-glance proof that you're seeing the current build.
|
/// and quick-glance proof that you're seeing the current build.
|
||||||
const String kStudioVersion = '0.51.8';
|
const String kStudioVersion = '0.51.9';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ static void my_application_activate(GApplication* application) {
|
||||||
gtk_window_set_title(window, "F\u2206I Studio");
|
gtk_window_set_title(window, "F\u2206I Studio");
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_window_set_default_size(window, 1280, 720);
|
gtk_window_set_default_size(window, 1440, 900);
|
||||||
|
|
||||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||||
fl_dart_project_set_dart_entrypoint_arguments(
|
fl_dart_project_set_dart_entrypoint_arguments(
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,28 @@ import FlutterMacOS
|
||||||
class MainFlutterWindow: NSWindow {
|
class MainFlutterWindow: NSWindow {
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
let flutterViewController = FlutterViewController()
|
let flutterViewController = FlutterViewController()
|
||||||
let windowFrame = self.frame
|
|
||||||
self.contentViewController = flutterViewController
|
self.contentViewController = flutterViewController
|
||||||
self.setFrame(windowFrame, display: true)
|
|
||||||
|
|
||||||
// Override the window title so the OS task switcher and
|
// Override the window title so the OS task switcher and
|
||||||
// window chrome read "F∆I Studio" instead of the
|
// window chrome read "F∆I Studio" instead of the
|
||||||
// pubspec-derived "fai_studio".
|
// pubspec-derived "fai_studio".
|
||||||
self.title = "F∆I Studio"
|
self.title = "F∆I Studio"
|
||||||
|
|
||||||
|
// Pick a comfortable default window size. 1440x900 is the
|
||||||
|
// effective Retina resolution of a 13" MacBook (Stefan's
|
||||||
|
// dev machine) and the smallest "modern desktop" footprint
|
||||||
|
// that comfortably fits the sidebar, content area, and a
|
||||||
|
// tooling panel side-by-side. Clamp to the active screen's
|
||||||
|
// visibleFrame so we never open larger than the display —
|
||||||
|
// important for external monitors at non-Retina scales.
|
||||||
|
if let screen = NSScreen.main {
|
||||||
|
let visible = screen.visibleFrame
|
||||||
|
let targetWidth = min(CGFloat(1440), visible.width)
|
||||||
|
let targetHeight = min(CGFloat(900), visible.height)
|
||||||
|
self.setContentSize(NSSize(width: targetWidth, height: targetHeight))
|
||||||
|
self.center()
|
||||||
|
}
|
||||||
|
|
||||||
RegisterGeneratedPlugins(registry: flutterViewController)
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||||
|
|
||||||
super.awakeFromNib()
|
super.awakeFromNib()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name: fai_studio
|
name: fai_studio
|
||||||
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.51.8
|
version: 0.51.9
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.0-200.1.beta
|
sdk: ^3.11.0-200.1.beta
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||||
|
|
||||||
FlutterWindow window(project);
|
FlutterWindow window(project);
|
||||||
Win32Window::Point origin(10, 10);
|
Win32Window::Point origin(10, 10);
|
||||||
Win32Window::Size size(1280, 720);
|
Win32Window::Size size(1440, 900);
|
||||||
if (!window.Create(L"F\u2206I Studio", origin, size)) {
|
if (!window.Create(L"F\u2206I Studio", origin, size)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue