Skip to content

Commit

Permalink
Show hover effect when hovering over window buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Sep 27, 2023
1 parent 56873ee commit 71caa1c
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions lib/widgets/custom_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,38 @@ class CustomAppBar extends AppBar {
leadingWidth: 460,
centerTitle: true,
actions: [
DecoratedMinimizeButton(
type: buttonType,
onPressed: () async => await windowManager.minimize(),
InkWell(
onTap: () {},
child: DecoratedMinimizeButton(
type: buttonType,
onPressed: () async => await windowManager.minimize(),
),
),
DecoratedMaximizeButton(
type: buttonType,
onPressed: () async {
if (await windowManager.isMaximized()) {
windowManager.unmaximize();
} else {
windowManager.maximize();
}
},
InkWell(
onTap: () {},
child: DecoratedMaximizeButton(
type: buttonType,
onPressed: () async {
if (await windowManager.isMaximized()) {
windowManager.unmaximize();
} else {
windowManager.maximize();
}
},
),
),
DecoratedCloseButton(
type: buttonType,
onPressed: () async {
if (onWindowClose == null) {
await windowManager.close();
} else {
onWindowClose.call();
}
},
InkWell(
onTap: () {},
child: DecoratedCloseButton(
type: buttonType,
onPressed: () async {
if (onWindowClose == null) {
await windowManager.close();
} else {
onWindowClose.call();
}
},
),
),
],
title: _WindowDragArea(
Expand Down

0 comments on commit 71caa1c

Please sign in to comment.