-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make web-apps resizeable #28311
make web-apps resizeable #28311
Conversation
1180520
to
40ab3f2
Compare
You can test it by invoking Nonetheless, I appreciate your work here and I hope this will get merged! |
SeparatePanel isn't meant to be resizable afaik, as it's a dialog class and dialog are usually of fixed size (such as confirmation dialogs, etc). If you want the web apps to be resizable, you have to rewrite them to RpWindow, i.e. turning them from a dialog to a common window, as IV does. |
I may try doing this, but before investing my time I would like to get an ack that making web apps resizeable aligns with the views of maintainers and has a chance of being merged.
What is IV? |
That's a question for @john-preston
Instant View |
Okay, I've tried it and apparently gamebot is just another webapp so this change applies to it as well. |
From the first look it seems to be too much effort to be honest... It uses a lot of What I mean is, are there any technical reasons to not allow As a side-note, it seems (from my limited investigation) that there it a lot of duplicate code between |
I don't see how you made it resizable just with the changes in the current lib_ui PR. Just removing setFixedSize call doesn't add resize handles, doesn't add maximize button. Re-implementing all the features required for proper resizability (which requires lots of native code on Windows) is likely way more work than switching to RpWindow. |
Hmm, I tested only on Linux and it worked fine.. |
The web view resizes itself correctly as is, I am not sure why or how.
Yes, that is missing. |
I'm not sure how it could be fine. I drag on the shadows and get no reaction as there's no resize handles on the shadow. |
I see what you mean, I use a tiling window manager so I didn't notice that :( |
Note that Qt::FramelessWindowHint breaks resizability on Windows and macOS. The hint has to be re-implemented with native code as RpWindow does. |
I'd leave them in a SeparatePanel, not in RpWindow, they look nicely there and the menu and back button integrate nicely in the wide title bar. I'm not against allowing optional resizing by the shadow area of SeparatePanel and enabling it in web bots and games, but this is a big amount of work (including some platform-specific code and testing on all three platforms) which I'm not ready to do right now. |
Wouldn't SeparatePanel look weird in maximized mode? |
I asked @john-preston privately whether native resize (with aero snap and etc) is really said and he said it's not. Thus simple QWindow::startSystemResize on shadows should be enough. |
I've implemented this with resizing by shadow, we'll see how it goes in the upcoming beta. |
It is just convenient to be able to resize the web view. I do not see any reason to restrict the size of the window on desktop to that of a mobile device.
This probably resolves #28254, but I'm not sure because I don't use any gamebots.
Depends on desktop-app/lib_ui#237