Skip to content

Conversation

GroovinChip
Copy link
Contributor

This PR adds the ability to control whether a created window can be resized or not by calling the resizable() function. Passing false to the function will result in a window that cannot be resized.

There is no need to explicitly set a window to be resizable - windows will be resizable by default.

Here is an example of a non-resizable window:

final window = await DesktopMultiWindow.createWindow(jsonEncode({
  'args1': 'Sub window',
  'args2': 100,
  'args3': true,
  'business': 'business_test',
}));

window
  ..setFrame(const Offset(0, 0) & const Size(1280, 720))
  ..center()
  ..setTitle('Another window')
  ..resizable(false)
  ..show();

Removing the ..resizable(false) call will result in a window that is resizable.

Please note that this feature has only been implemented for macOS. The documentation reflects this, and a platform check has been implemented to ensure developers do not try to use it on other platforms. (The docs and check can of course be updated in the future if the feature is implemented on Windows and Linux.)

Closes #101

@boyan01 boyan01 merged commit 775846b into MixinNetwork:main Aug 7, 2022
@boyan01
Copy link
Contributor

boyan01 commented Aug 7, 2022

LGTM.

Thanks for the fix. 💙

@GroovinChip
Copy link
Contributor Author

LGTM.

Thanks for the fix. 💙

Hurray!! Thanks so much for reviewing & merging so quickly!! And it's my pleasure 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[desktop_multi_window] Proposal: Add a resizable boolean setter to WindowController
2 participants