Skip to content

Commit 5a869b5

Browse files
committed
v0.2.5
1 parent 9d65b27 commit 5a869b5

File tree

6 files changed

+72
-77
lines changed

6 files changed

+72
-77
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 0.2.5
2+
3+
* [linux] fix method response memory leaks (#159)
4+
* [linux] Implement destroy #158
5+
* [linux] Implement getOpacity & setOpacity #157
6+
* [macos] Reimplement setBounds & getBounds method. #156
7+
* Make WindowOptions constructor to const constructor. #147
8+
* [windows] fix window overflow #131
9+
* [macos] Add the animate parameter to setBounds method #142
10+
* [linux] fix popUpWindowMenu() on Wayland #145
11+
112
## 0.2.3
213

314
* Fixed cannot convert type Double to type CGFloat #138

README-ZH.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
- [WindowManager](#windowmanager)
4040
- [Methods](#methods)
4141
- [waitUntilReadyToShow](#waituntilreadytoshow)
42-
- [destroy `macos` `windows`](#destroy--macos--windows)
42+
- [destroy](#destroy)
4343
- [close](#close)
4444
- [isPreventClose](#ispreventclose)
4545
- [setPreventClose](#setpreventclose)
@@ -59,14 +59,14 @@
5959
- [setFullScreen](#setfullscreen)
6060
- [setAspectRatio](#setaspectratio)
6161
- [setBackgroundColor](#setbackgroundcolor)
62-
- [getBounds](#getbounds)
63-
- [setBounds](#setbounds)
64-
- [getPosition](#getposition)
6562
- [setAlignment](#setalignment)
6663
- [center](#center)
67-
- [setPosition](#setposition)
64+
- [getBounds](#getbounds)
65+
- [setBounds](#setbounds)
6866
- [getSize](#getsize)
6967
- [setSize](#setsize)
68+
- [getPosition](#getposition)
69+
- [setPosition](#setposition)
7070
- [setMinimumSize](#setminimumsize)
7171
- [setMaximumSize](#setmaximumsize)
7272
- [isResizable](#isresizable)
@@ -83,16 +83,16 @@
8383
- [setAlwaysOnBottom `linux`](#setalwaysonbottom--linux)
8484
- [getTitle](#gettitle)
8585
- [setTitle](#settitle)
86-
- [setTitleBarStyle `macos` `windows`](#settitlebarstyle--macos--windows)
86+
- [setTitleBarStyle](#settitlebarstyle)
8787
- [getTitleBarHeight](#gettitlebarheight)
8888
- [isSkipTaskbar](#isskiptaskbar)
8989
- [setSkipTaskbar](#setskiptaskbar)
9090
- [setProgressBar `macos`](#setprogressbar--macos)
9191
- [setIcon `windows`](#seticon--windows)
9292
- [hasShadow `macos` `windows`](#hasshadow--macos--windows)
9393
- [setHasShadow `macos` `windows`](#sethasshadow--macos--windows)
94-
- [getOpacity `macos` `windows`](#getopacity--macos--windows)
95-
- [setOpacity `macos` `windows`](#setopacity--macos--windows)
94+
- [getOpacity](#getopacity)
95+
- [setOpacity](#setopacity)
9696
- [setBrightness `macos` `windows`](#setbrightness--macos--windows)
9797
- [setIgnoreMouseEvents](#setignoremouseevents)
9898
- [startDragging](#startdragging)
@@ -131,7 +131,7 @@
131131

132132
```yaml
133133
dependencies:
134-
window_manager: ^0.2.3
134+
window_manager: ^0.2.5
135135
```
136136
137137
@@ -452,9 +452,9 @@ class _HomePageState extends State<HomePage> with WindowListener {
452452
- [AuthPass](https://authpass.app/) - 基于Flutter的密码管理器,适用于所有平台。兼容Keepass 2.x(kdbx 3.x)。
453453
- [Biyi (比译)](https://biyidev.com/) - 一个便捷的翻译和词典应用程序。
454454
- [BlueBubbles](https://github.com/BlueBubblesApp/bluebubbles-app) - BlueBubbles is an ecosystem of apps bringing iMessage to Android, Windows, and Linux
455-
- [Yukino](https://github.com/yukino-app/yukino/tree/flutter-rewrite) - Yukino lets you read manga or stream anime ad-free from multiple sources.
456455
- [LunaSea](https://github.com/CometTools/LunaSea) - A self-hosted controller for mobile and macOS built using the Flutter framework.
457456
- [Linwood Butterfly](https://github.com/LinwoodCloud/Butterfly) - 用 Flutter 编写的开源笔记应用
457+
- [RustDesk](https://github.com/rustdesk/rustdesk) - 远程桌面软件,开箱即用,无需任何配置。您完全掌控数据,不用担心安全问题。
458458

459459
## API
460460

@@ -467,11 +467,10 @@ class _HomePageState extends State<HomePage> with WindowListener {
467467

468468
Wait until ready to show.
469469

470-
##### destroy `macos` `windows`
470+
##### destroy
471471

472472
Force closing the window.
473473

474-
475474
##### close
476475

477476
Try to close the window.
@@ -551,18 +550,6 @@ This will make a window maintain an aspect ratio.
551550

552551
Sets the background color of the window.
553552

554-
##### getBounds
555-
556-
Returns `Rect` - The bounds of the window as Object.
557-
558-
##### setBounds
559-
560-
Resizes and moves the window to the supplied bounds.
561-
562-
##### getPosition
563-
564-
Returns `Offset` - Contains the window's current position.
565-
566553
##### setAlignment
567554

568555
Move the window to a position aligned with the screen.
@@ -571,9 +558,13 @@ Move the window to a position aligned with the screen.
571558

572559
Moves window to the center of the screen.
573560

574-
##### setPosition
561+
##### getBounds
575562

576-
Moves window to position.
563+
Returns `Rect` - The bounds of the window as Object.
564+
565+
##### setBounds
566+
567+
Resizes and moves the window to the supplied bounds.
577568

578569
##### getSize
579570

@@ -583,6 +574,14 @@ Returns `Size` - Contains the window's width and height.
583574

584575
Resizes the window to `width` and `height`.
585576

577+
##### getPosition
578+
579+
Returns `Offset` - Contains the window's current position.
580+
581+
##### setPosition
582+
583+
Moves window to position.
584+
586585
##### setMinimumSize
587586

588587
Sets the minimum size of window to `width` and `height`.
@@ -654,11 +653,10 @@ Returns `String` - The title of the native window.
654653

655654
Changes the title of native window to title.
656655

657-
##### setTitleBarStyle `macos` `windows`
656+
##### setTitleBarStyle
658657

659658
Changes the title bar style of native window.
660659

661-
662660
##### getTitleBarHeight
663661

664662
Returns `int` - The title bar height of the native window.
@@ -691,16 +689,14 @@ Returns `bool` - Whether the window has a shadow. On Windows, always returns tru
691689
Sets whether the window should have a shadow. On Windows, doesn't do anything unless window is frameless.
692690

693691

694-
##### getOpacity `macos` `windows`
692+
##### getOpacity
695693

696-
Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns 1.
694+
Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque).
697695

698-
699-
##### setOpacity `macos` `windows`
696+
##### setOpacity
700697

701698
Sets the opacity of the window.
702699

703-
704700
##### setBrightness `macos` `windows`
705701

706702
Sets the brightness of the window.

README.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ English | [简体中文](./README-ZH.md)
3939
- [WindowManager](#windowmanager)
4040
- [Methods](#methods)
4141
- [waitUntilReadyToShow](#waituntilreadytoshow)
42-
- [destroy `macos` `windows`](#destroy--macos--windows)
42+
- [destroy](#destroy)
4343
- [close](#close)
4444
- [isPreventClose](#ispreventclose)
4545
- [setPreventClose](#setpreventclose)
@@ -59,14 +59,14 @@ English | [简体中文](./README-ZH.md)
5959
- [setFullScreen](#setfullscreen)
6060
- [setAspectRatio](#setaspectratio)
6161
- [setBackgroundColor](#setbackgroundcolor)
62-
- [getBounds](#getbounds)
63-
- [setBounds](#setbounds)
64-
- [getPosition](#getposition)
6562
- [setAlignment](#setalignment)
6663
- [center](#center)
67-
- [setPosition](#setposition)
64+
- [getBounds](#getbounds)
65+
- [setBounds](#setbounds)
6866
- [getSize](#getsize)
6967
- [setSize](#setsize)
68+
- [getPosition](#getposition)
69+
- [setPosition](#setposition)
7070
- [setMinimumSize](#setminimumsize)
7171
- [setMaximumSize](#setmaximumsize)
7272
- [isResizable](#isresizable)
@@ -83,16 +83,16 @@ English | [简体中文](./README-ZH.md)
8383
- [setAlwaysOnBottom `linux`](#setalwaysonbottom--linux)
8484
- [getTitle](#gettitle)
8585
- [setTitle](#settitle)
86-
- [setTitleBarStyle `macos` `windows`](#settitlebarstyle--macos--windows)
86+
- [setTitleBarStyle](#settitlebarstyle)
8787
- [getTitleBarHeight](#gettitlebarheight)
8888
- [isSkipTaskbar](#isskiptaskbar)
8989
- [setSkipTaskbar](#setskiptaskbar)
9090
- [setProgressBar `macos`](#setprogressbar--macos)
9191
- [setIcon `windows`](#seticon--windows)
9292
- [hasShadow `macos` `windows`](#hasshadow--macos--windows)
9393
- [setHasShadow `macos` `windows`](#sethasshadow--macos--windows)
94-
- [getOpacity `macos` `windows`](#getopacity--macos--windows)
95-
- [setOpacity `macos` `windows`](#setopacity--macos--windows)
94+
- [getOpacity](#getopacity)
95+
- [setOpacity](#setopacity)
9696
- [setBrightness `macos` `windows`](#setbrightness--macos--windows)
9797
- [setIgnoreMouseEvents](#setignoremouseevents)
9898
- [startDragging](#startdragging)
@@ -131,7 +131,7 @@ Add this to your package's `pubspec.yaml` file:
131131

132132
```yaml
133133
dependencies:
134-
window_manager: ^0.2.3
134+
window_manager: ^0.2.5
135135
```
136136
137137
Or
@@ -452,9 +452,9 @@ class _HomePageState extends State<HomePage> with WindowListener {
452452
- [AuthPass](https://authpass.app/) - Password Manager based on Flutter for all platforms. Keepass 2.x (kdbx 3.x) compatible.
453453
- [Biyi (比译)](https://biyidev.com/) - A convenient translation and dictionary app written in dart / Flutter.
454454
- [BlueBubbles](https://github.com/BlueBubblesApp/bluebubbles-app) - BlueBubbles is an ecosystem of apps bringing iMessage to Android, Windows, and Linux
455-
- [Yukino](https://github.com/yukino-app/yukino/tree/flutter-rewrite) - Yukino lets you read manga or stream anime ad-free from multiple sources.
456455
- [LunaSea](https://github.com/CometTools/LunaSea) - A self-hosted controller for mobile and macOS built using the Flutter framework.
457456
- [Linwood Butterfly](https://github.com/LinwoodCloud/Butterfly) - Open source note taking app written in Flutter
457+
- [RustDesk](https://github.com/rustdesk/rustdesk) - Yet another remote desktop software, written in Rust. Works out of the box, no configuration required.
458458

459459
## API
460460

@@ -467,11 +467,10 @@ class _HomePageState extends State<HomePage> with WindowListener {
467467

468468
Wait until ready to show.
469469

470-
##### destroy `macos` `windows`
470+
##### destroy
471471

472472
Force closing the window.
473473

474-
475474
##### close
476475

477476
Try to close the window.
@@ -551,18 +550,6 @@ This will make a window maintain an aspect ratio.
551550

552551
Sets the background color of the window.
553552

554-
##### getBounds
555-
556-
Returns `Rect` - The bounds of the window as Object.
557-
558-
##### setBounds
559-
560-
Resizes and moves the window to the supplied bounds.
561-
562-
##### getPosition
563-
564-
Returns `Offset` - Contains the window's current position.
565-
566553
##### setAlignment
567554

568555
Move the window to a position aligned with the screen.
@@ -571,9 +558,13 @@ Move the window to a position aligned with the screen.
571558

572559
Moves window to the center of the screen.
573560

574-
##### setPosition
561+
##### getBounds
575562

576-
Moves window to position.
563+
Returns `Rect` - The bounds of the window as Object.
564+
565+
##### setBounds
566+
567+
Resizes and moves the window to the supplied bounds.
577568

578569
##### getSize
579570

@@ -583,6 +574,14 @@ Returns `Size` - Contains the window's width and height.
583574

584575
Resizes the window to `width` and `height`.
585576

577+
##### getPosition
578+
579+
Returns `Offset` - Contains the window's current position.
580+
581+
##### setPosition
582+
583+
Moves window to position.
584+
586585
##### setMinimumSize
587586

588587
Sets the minimum size of window to `width` and `height`.
@@ -654,11 +653,10 @@ Returns `String` - The title of the native window.
654653

655654
Changes the title of native window to title.
656655

657-
##### setTitleBarStyle `macos` `windows`
656+
##### setTitleBarStyle
658657

659658
Changes the title bar style of native window.
660659

661-
662660
##### getTitleBarHeight
663661

664662
Returns `int` - The title bar height of the native window.
@@ -691,16 +689,14 @@ Returns `bool` - Whether the window has a shadow. On Windows, always returns tru
691689
Sets whether the window should have a shadow. On Windows, doesn't do anything unless window is frameless.
692690

693691

694-
##### getOpacity `macos` `windows`
692+
##### getOpacity
695693

696-
Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns 1.
694+
Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque).
697695

698-
699-
##### setOpacity `macos` `windows`
696+
##### setOpacity
700697

701698
Sets the opacity of the window.
702699

703-
704700
##### setBrightness `macos` `windows`
705701

706702
Sets the brightness of the window.

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ packages:
197197
path: ".."
198198
relative: true
199199
source: path
200-
version: "0.2.3"
200+
version: "0.2.5"
201201
sdks:
202202
dart: ">=2.17.0-0 <3.0.0"
203203
flutter: ">=1.20.0"

lib/src/window_manager.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ class WindowManager {
133133
}
134134

135135
/// Force closing the window.
136-
///
137-
/// @platforms macos,windows
138136
Future<void> destroy() async {
139137
await _channel.invokeMethod('destroy');
140138
}
@@ -472,8 +470,6 @@ class WindowManager {
472470
}
473471

474472
/// Changes the title bar style of native window.
475-
///
476-
/// @platforms macos,windows
477473
Future<void> setTitleBarStyle(
478474
TitleBarStyle titleBarStyle, {
479475
bool windowButtonVisibility = true,
@@ -545,16 +541,12 @@ class WindowManager {
545541
await _channel.invokeMethod('setHasShadow', arguments);
546542
}
547543

548-
/// Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns 1.
549-
///
550-
/// @platforms macos,windows
544+
/// Returns `double` - between 0.0 (fully transparent) and 1.0 (fully opaque).
551545
Future<double> getOpacity() async {
552546
return await _channel.invokeMethod('getOpacity');
553547
}
554548

555549
/// Sets the opacity of the window.
556-
///
557-
/// @platforms macos,windows
558550
Future<void> setOpacity(double opacity) async {
559551
final Map<String, dynamic> arguments = {
560552
'opacity': opacity,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: window_manager
22
description: This plugin allows Flutter desktop apps to resizing and repositioning the window.
3-
version: 0.2.3
3+
version: 0.2.5
44
homepage: https://github.com/leanflutter/window_manager
55

66
platforms:

0 commit comments

Comments
 (0)