Skip to content

Commit a9411c0

Browse files
committed
Merge pull request #3811 from canonical/flutter-small-screen-resolution
add 1024x576 as an intermediate GUI resolution for smaller screens
1 parent f65be22 commit a9411c0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/client/gui/lib/main.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ void main() async {
3636
return screen?.frame.size;
3737
});
3838

39-
final windowSize = (screenSize != null &&
40-
screenSize.width >= 1600 &&
41-
screenSize.height >= 900)
39+
final windowSize = (screenSize != null)
40+
? (screenSize.width >= 1600 && screenSize.height >= 900)
4241
? const Size(1400, 822) // For screens 1600x900 or larger
43-
: const Size(750, 450); // Default window size
42+
: (screenSize.width >= 1280 && screenSize.height >= 720)
43+
? const Size(1024, 576) // For screens 1280x720 or larger
44+
: const Size(750, 450) // Default window size
45+
: const Size(750, 450); // Default window size if screenSize is null
4446

4547
await windowManager.ensureInitialized();
4648

0 commit comments

Comments
 (0)