From 7db3abab473af403c156d26be580713e3d1e4a4f Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 25 Nov 2022 09:01:09 -0600 Subject: [PATCH] desktop starting to height be 3/4 screen height or 900, whichever is smaller --- lib/main.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index 11a851b79..d5980409f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; +import 'dart:math'; import 'package:cw_core/node.dart'; import 'package:cw_core/unspent_coins_info.dart'; @@ -79,6 +80,15 @@ void main() async { setWindowTitle('Stack Wallet'); setWindowMinSize(const Size(1220, 100)); setWindowMaxSize(Size.infinite); + final screen = await getCurrentScreen(); + final screenHeight = screen?.frame.height; + if (screenHeight != null) { + // starting to height be 3/4 screen height or 900, whichever is smaller + final height = min(screenHeight * 0.75, 900); + setWindowFrame( + Rect.fromLTWH(0, 0, 1220, height), + ); + } } // FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);