From 26d16dc2c921fda69d13f6d0a381f5a24dde087b Mon Sep 17 00:00:00 2001 From: Prateek SU Date: Sun, 31 Jul 2022 16:04:35 +0530 Subject: [PATCH 1/2] Remove decoration for maximized window --- lib/src/widgets/virtual_window_frame.dart | 31 +++++++++++++---------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lib/src/widgets/virtual_window_frame.dart b/lib/src/widgets/virtual_window_frame.dart index cdec7677..d7424c25 100644 --- a/lib/src/widgets/virtual_window_frame.dart +++ b/lib/src/widgets/virtual_window_frame.dart @@ -49,20 +49,25 @@ class _VirtualWindowFrameState extends State margin: (_isMaximized || _isFullScreen) ? EdgeInsets.zero : EdgeInsets.all(kVirtualWindowFrameMargin), - decoration: BoxDecoration( - color: Colors.transparent, - border: Border.all(color: Theme.of(context).dividerColor, width: 1), - borderRadius: BorderRadius.circular(6), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.1), - offset: Offset(0.0, _isFocused ? 4 : 2), - blurRadius: 6, - ), - ], - ), + decoration: (_isMaximized || _isFullScreen) + ? BoxDecoration() + : BoxDecoration( + color: Colors.transparent, + border: + Border.all(color: Theme.of(context).dividerColor, width: 1), + borderRadius: BorderRadius.circular(6), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.1), + offset: Offset(0.0, _isFocused ? 4 : 2), + blurRadius: 6, + ), + ], + ), child: ClipRRect( - borderRadius: BorderRadius.circular(6), + borderRadius: (_isMaximized || _isFullScreen) + ? BorderRadius.zero + : BorderRadius.circular(6), child: widget.child, ), ); From 26588765762e7c88ffb467e2962b33e7c9cd025c Mon Sep 17 00:00:00 2001 From: Prateek SU Date: Sun, 31 Jul 2022 18:12:54 +0530 Subject: [PATCH 2/2] Fix rebuilds on maximize --- lib/src/widgets/virtual_window_frame.dart | 37 ++++++++++++----------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/lib/src/widgets/virtual_window_frame.dart b/lib/src/widgets/virtual_window_frame.dart index d7424c25..fde2bae0 100644 --- a/lib/src/widgets/virtual_window_frame.dart +++ b/lib/src/widgets/virtual_window_frame.dart @@ -49,25 +49,28 @@ class _VirtualWindowFrameState extends State margin: (_isMaximized || _isFullScreen) ? EdgeInsets.zero : EdgeInsets.all(kVirtualWindowFrameMargin), - decoration: (_isMaximized || _isFullScreen) - ? BoxDecoration() - : BoxDecoration( - color: Colors.transparent, - border: - Border.all(color: Theme.of(context).dividerColor, width: 1), - borderRadius: BorderRadius.circular(6), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.1), - offset: Offset(0.0, _isFocused ? 4 : 2), - blurRadius: 6, - ), - ], + decoration: BoxDecoration( + color: Colors.transparent, + border: Border.all( + color: Theme.of(context).dividerColor, + width: (_isMaximized || _isFullScreen) ? 0 : 1, + ), + borderRadius: BorderRadius.circular( + (_isMaximized || _isFullScreen) ? 0 : 6, + ), + boxShadow: [ + if (!_isMaximized && !_isFullScreen) + BoxShadow( + color: Colors.black.withOpacity(0.1), + offset: Offset(0.0, _isFocused ? 4 : 2), + blurRadius: 6, ), + ], + ), child: ClipRRect( - borderRadius: (_isMaximized || _isFullScreen) - ? BorderRadius.zero - : BorderRadius.circular(6), + borderRadius: BorderRadius.circular( + (_isMaximized || _isFullScreen) ? 0 : 6, + ), child: widget.child, ), );