From bbc8a2985386e267babb108ca3888ff2a7d06a41 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Thu, 3 Feb 2022 19:14:30 +0600 Subject: [PATCH] windows title_bar on macos fix page titlebar leading overlap with native macos titlebar buttons fix --- lib/components/Home.dart | 4 +++- lib/components/Shared/PageWindowTitleBar.dart | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/components/Home.dart b/lib/components/Home.dart index 0f89927e..1a4be44d 100644 --- a/lib/components/Home.dart +++ b/lib/components/Home.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart' hide Page; @@ -155,7 +157,7 @@ class _HomeState extends State { child: MoveWindow(), ), Expanded(child: MoveWindow()), - const TitleBarActionButtons(), + if (!Platform.isMacOS) const TitleBarActionButtons(), ], )), ], diff --git a/lib/components/Shared/PageWindowTitleBar.dart b/lib/components/Shared/PageWindowTitleBar.dart index 2225d6d5..b299da40 100644 --- a/lib/components/Shared/PageWindowTitleBar.dart +++ b/lib/components/Shared/PageWindowTitleBar.dart @@ -59,6 +59,10 @@ class PageWindowTitleBar extends StatelessWidget return WindowTitleBarBox( child: Row( children: [ + if (Platform.isMacOS) + const SizedBox( + width: 150, + ), if (leading != null) leading!, Expanded(child: MoveWindow(child: Center(child: center))), if (!Platform.isMacOS) const TitleBarActionButtons()