💄 Better macos window
This commit is contained in:
parent
343b84e3e1
commit
b2a2d38c3d
@ -59,9 +59,6 @@ Future<void> _initializePlatformComponents() async {
|
|||||||
if (PlatformInfo.isMacOS) {
|
if (PlatformInfo.isMacOS) {
|
||||||
await Future.wait([
|
await Future.wait([
|
||||||
Window.hideTitle(),
|
Window.hideTitle(),
|
||||||
Window.hideCloseButton(),
|
|
||||||
Window.hideMiniaturizeButton(),
|
|
||||||
Window.hideZoomButton(),
|
|
||||||
Window.makeTitlebarTransparent(),
|
Window.makeTitlebarTransparent(),
|
||||||
Window.enableFullSizeContentView(),
|
Window.enableFullSizeContentView(),
|
||||||
]);
|
]);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:solian/platform.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
import 'package:solian/widgets/navigation/app_navigation.dart';
|
import 'package:solian/widgets/navigation/app_navigation.dart';
|
||||||
@ -31,7 +32,20 @@ class RootShell extends StatelessWidget {
|
|||||||
AppNavigation.destinationPages.contains(routeName);
|
AppNavigation.destinationPages.contains(routeName);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SolianTheme.isLargeScreen(context)
|
body: Column(
|
||||||
|
children: [
|
||||||
|
if (PlatformInfo.isMacOS)
|
||||||
|
Container(
|
||||||
|
height: 28,
|
||||||
|
color: Theme.of(context).colorScheme.surface,
|
||||||
|
),
|
||||||
|
if (PlatformInfo.isMacOS)
|
||||||
|
const Divider(
|
||||||
|
thickness: 0.3,
|
||||||
|
height: 0.3,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SolianTheme.isLargeScreen(context)
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
if (showNavigation) const AppNavigationRail(),
|
if (showNavigation) const AppNavigationRail(),
|
||||||
@ -58,6 +72,9 @@ class RootShell extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,16 +330,16 @@
|
|||||||
</items>
|
</items>
|
||||||
<point key="canvasLocation" x="142" y="-258"/>
|
<point key="canvasLocation" x="142" y="-258"/>
|
||||||
</menu>
|
</menu>
|
||||||
<window title="Solian" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Solian" customModuleProvider="target">
|
<window title="Solian" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Solian" customModuleProvider="target">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
|
||||||
<rect key="contentRect" x="335" y="390" width="960" height="540"/>
|
<rect key="contentRect" x="335" y="390" width="1280" height="800"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
|
||||||
<value key="minSize" type="size" width="380" height="540"/>
|
<value key="minSize" type="size" width="380" height="540"/>
|
||||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="960" height="540"/>
|
<rect key="frame" x="0.0" y="0.0" width="1280" height="800"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</view>
|
</view>
|
||||||
<point key="canvasLocation" x="266" y="141.5"/>
|
<point key="canvasLocation" x="262" y="95"/>
|
||||||
</window>
|
</window>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
|
Loading…
Reference in New Issue
Block a user