feat: set window size

This commit is contained in:
Yannick Mauray 2024-06-27 20:35:52 +02:00
parent 3c0609e79b
commit 0da47a7ae2
No known key found for this signature in database
GPG Key ID: C5C52B9E46D9F148
1 changed files with 8 additions and 2 deletions

View File

@ -74,8 +74,14 @@ Future<void> getIcons() async {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Don't forget to also change the size in linux/my_application.cc:50
setWindowMinSize(const Size(692, 580));
setWindowMaxSize(const Size(692, 580));
// Don't forget to also change the size in macos/Runner/MainFlutterWindow.swift:7
if (Platform.isMacOS) {
setWindowMinSize(const Size(692 + 2, 580 + 30));
setWindowMaxSize(const Size(692 + 2, 580 + 30));
} else {
setWindowMinSize(const Size(692, 580));
setWindowMaxSize(const Size(692, 580));
}
final foundQuickGet = await Process.run('which', ['quickget']);
if (foundQuickGet.exitCode == 0) {
gOperatingSystems = loadOperatingSystems(false);