Skip to content

Commit

Permalink
Merge branch 'main' into display-camera-stream-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 authored Feb 13, 2025
2 parents fdfa0ed + 6df4287 commit 407b62a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/pages/dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1716,15 +1716,11 @@ class _DashboardPageState extends State<DashboardPage> with WindowListener {

void _onDriverStationDocked() async {
Display primaryDisplay = await screenRetriever.getPrimaryDisplay();
double pixelRatio = primaryDisplay.scaleFactor?.toDouble() ?? 1.0;
Size screenSize =
(primaryDisplay.visibleSize ?? primaryDisplay.size) * pixelRatio;
Size screenSize = primaryDisplay.visibleSize ?? primaryDisplay.size;

await windowManager.unmaximize();

Size newScreenSize =
Size(screenSize.width, (screenSize.height) - (200 * pixelRatio)) /
pixelRatio;
Size newScreenSize = Size(screenSize.width, screenSize.height - 200);

await windowManager.setSize(newScreenSize);

Expand All @@ -1743,8 +1739,10 @@ class _DashboardPageState extends State<DashboardPage> with WindowListener {
await windowManager.setResizable(true);

// Re-adds the window frame, window manager's API for this is weird
await windowManager.setTitleBarStyle(TitleBarStyle.hidden,
windowButtonVisibility: false);
await windowManager.setTitleBarStyle(
TitleBarStyle.hidden,
windowButtonVisibility: false,
);
}

void _showWindowCloseConfirmation(BuildContext context) {
Expand Down

0 comments on commit 407b62a

Please sign in to comment.