Closed techno-disaster closed 3 years ago
the setWindowMinSize works but I can't get it to maximise
I'm not sure what this means; there's no functionality in window_size
to maximize a window. Are you saying that setWindowMinSize
breaks your ability to maximize the window via the UI?
the setWindowMinSize works but I can't get it to maximise
I'm not sure what this means; there's no functionality in
window_size
to maximize a window. Are you saying thatsetWindowMinSize
breaks your ability to maximize the window via the UI?
yep, and it also breaks resizing the same by grabbing some corner. Also just saw that if I set setWindowMaxSize
to some const value the resizing works but setting setWindowMaxSize
to infinite breaks it again
Just read the README to not create issues here. Should I make a new one on the Flutter issue tracker?
Just read the README to not create issues here.
That's not what the README actually says. If this issue only happens after calling setWindowMinSize
, then it's a bug report about a plugin in this repository:
For bug reports and feature requests related to the plugins in this repository, please file issues here.
@robert-ancell This suggests that -1 isn't working as "unset" as the GtkWindow
docs claim. Any thoughts on why that would be?
It's very hard to tell exactly what is going wrong without a test case - @Techno-Disaster can you show some code that reproduces this?
I had a look at the code and Flutter considers a minimum size of (0, 0) to be unconstrained, but GTK expects (-1, -1). I've made a PR that fixes this. If you were setting a minimum size and then clearing it, then this would have not be informing GTK to make the window unconstrained. If that was the problem then changing the min size from (0, 0) to (-1, -1) may make the problem go away.
Under GNOME, setting the min/max window sizes has no effect on the ability to maximise - this behaviour may be window manager dependent.
@robert-ancell A sample where it fails can be the following, which is a GUI for the command line tool fvm. https://github.com/leoafarias/sidekick/blob/b12b1b2adc7163dc5828fadd6de32bc820fe505a/lib/main.dart#L22
I had a look at the code and Flutter considers a minimum size of (0, 0) to be unconstrained, but GTK expects (-1, -1).
The cases described are ones where the minimum values are set to non-special values, but the max values are -1, so it's max that's the issue here.
Ah, re-reading the documentation I see that setting a size to (-1, -1)
sets it to the requisition size, which is the size that GTK has determined the window should be. To be unconstrained we want to set the size to (G_MAXINT, G_MAXINT)
.
which is the size that GTK has determined the window should be
Ah-ha; when I looked at the docs I assumed that meant the size that the resize action was requesting a resize to.
Describe the bug Have the simple counter app in running, the setWindowMinSize works but I can't get it to maximise or resize the window. Could this be a windowing system issue? I'm on Fedora KDE right now.
Doctor Output Please provide the output of
flutter doctor -v
: