Skip to content

Commit

Permalink
feat: platform title bar buttons add
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 11, 2022
1 parent ff14469 commit 54048cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/components/Shared/PageWindowTitleBar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ class PageWindowTitleBar extends StatelessWidget
),
if (leading != null) leading!,
Expanded(child: MoveWindow(child: Center(child: center))),
if (!kIsMacOS && !kIsMobile)
TitleBarActionButtons(color: foregroundColor)
if (!kIsMacOS && !kIsMobile) const PlatformWindowButtons()
],
),
),
Expand Down
7 changes: 7 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
macosTheme: macosTheme,
macosDarkTheme: macosDarkTheme,
themeMode: themeMode,
windowButtonConfig: PlatformWindowButtonConfig(
isMaximized: appWindow.isMaximized,
onClose: appWindow.close,
onRestore: appWindow.restore,
onMaximize: appWindow.maximize,
onMinimize: appWindow.minimize,
),
shortcuts: PlatformProperty.all({
...WidgetsApp.defaultShortcuts.map((key, value) {
return MapEntry(
Expand Down

0 comments on commit 54048cb

Please sign in to comment.