Skip to content

Commit

Permalink
Merge pull request #3811 from canonical/flutter-small-screen-resolution
Browse files Browse the repository at this point in the history
add 1024x576 as an intermediate GUI resolution for smaller screens
  • Loading branch information
ricab committed Dec 4, 2024
1 parent f65be22 commit a9411c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/client/gui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ void main() async {
return screen?.frame.size;
});

final windowSize = (screenSize != null &&
screenSize.width >= 1600 &&
screenSize.height >= 900)
final windowSize = (screenSize != null)
? (screenSize.width >= 1600 && screenSize.height >= 900)
? const Size(1400, 822) // For screens 1600x900 or larger
: const Size(750, 450); // Default window size
: (screenSize.width >= 1280 && screenSize.height >= 720)
? const Size(1024, 576) // For screens 1280x720 or larger
: const Size(750, 450) // Default window size
: const Size(750, 450); // Default window size if screenSize is null

await windowManager.ensureInitialized();

Expand Down

0 comments on commit a9411c0

Please sign in to comment.