Skip to content

Commit

Permalink
Merge pull request #79 from openvinotoolkit/rhecker/unmaximize-too
Browse files Browse the repository at this point in the history
Toggle maximize instead
  • Loading branch information
RHeckerIntel authored Dec 20, 2024
2 parents 3d33ef6 + 7861f5d commit dc14f25
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/openvino_console_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ class _OpenVINOTestDriveAppState extends State<OpenVINOTestDriveApp> {
return index;
}

void toggleMaximize() {
windowManager.isMaximized().then((isMaximized) {
if (isMaximized) {
windowManager.unmaximize();
} else {
windowManager.maximize();
}
});
}

@override
Widget build(BuildContext context) {
return Stack(
Expand All @@ -143,7 +153,7 @@ class _OpenVINOTestDriveAppState extends State<OpenVINOTestDriveApp> {
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTapDown: (_) => windowManager.startDragging(),
onDoubleTap: () => windowManager.maximize(),
onDoubleTap: toggleMaximize,
child: SizedBox(
height: 48,
child: Align(
Expand Down

0 comments on commit dc14f25

Please sign in to comment.