windows title_bar on macos fix

page titlebar leading overlap with native macos titlebar buttons fix
This commit is contained in:
Kingkor Roy Tirtho 2022-02-03 19:14:30 +06:00
parent 350fc75803
commit bbc8a29853
2 changed files with 7 additions and 1 deletions

View File

@ -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<Home> {
child: MoveWindow(),
),
Expanded(child: MoveWindow()),
const TitleBarActionButtons(),
if (!Platform.isMacOS) const TitleBarActionButtons(),
],
)),
],

View File

@ -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()