Add Windows runner files for high DPI support and console output
- Created runner.exe.manifest to enable DPI awareness and dark mode support. - Implemented utility functions in utils.cpp and utils.h for console creation and command line argument handling. - Developed Win32Window class in win32_window.cpp and win32_window.h to manage high DPI-aware windows, including theme updates and message handling.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:notas/platform/app_platform.dart';
|
||||
import 'package:notas/platform/window_state.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
Future<void> bootstrapWindow() async {
|
||||
if (!isDesktop) {
|
||||
return;
|
||||
}
|
||||
|
||||
await windowManager.ensureInitialized();
|
||||
|
||||
final Size initialSize =
|
||||
await WindowStateStore.instance.loadWindowSize() ?? const Size(900, 700);
|
||||
|
||||
final WindowOptions windowOptions = WindowOptions(
|
||||
size: initialSize,
|
||||
minimumSize: Size(400, 600),
|
||||
center: true,
|
||||
titleBarStyle: TitleBarStyle.hidden,
|
||||
);
|
||||
|
||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||
await windowManager.show();
|
||||
await windowManager.setMinimumSize(const Size(400, 600));
|
||||
await windowManager.setSize(initialSize);
|
||||
await windowManager.focus();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user