Conversation
This reverts commit e9c9a9a.
Removes some details about expected behavior of webview_set_size() due
to inconsistencies observed when using GTK 4.
The documentation states the following:
GTK 4 can set a default/initial window size if done early enough;
otherwise, this function has no effect. GTK 4 (unlike 3) can't
resize a window after it has been set up.
Observations when calling webview_set_size() with WEBVIEW_HINT_NONE:
Ubuntu | GTK | Window | Can set new size?
-- | --- | ------- | -----------------
24.04.2 | 4.14.2 | X11 | If different from what was previously set
24.04.2 | 4.14.2 | Wayland | If user hasn't resized by hand
24.04.2 | 3.24.41 | X11 | Yes
24.04.2 | 3.24.41 | Wayland | Yes
22.04.5 | 4.6.9 | X11 | If different from what was previously set
22.04.5 | 4.6.9 | Wayland | Yes
22.04.5 | 3.24.33 | X11 | Yes
22.04.5 | 3.24.33 | Wayland | Yes
gtk_widget_set_size_request() was called when WEBVIEW_HINT_FIXED was passed into webview_set_size(). That function is meant to set a minimum size. Instead we can call gtk_window_set_default_size() (GTK 4) or gtk_window_resize() (GTK 3).
|
I've faced the following problem: It can be solved by adding to the Not sure if it is 100% safe to do, but at least it works for me. |
|
Also, to prevent gcc from complaining that |
|
It looks like you cannot make window resizeable. The following line makes window resizable on GTK webview, but not on Qt5 one: |
|
Qt5 has reached its EOL, and therefore |
Did some research and found https://discourse.cmake.org/t/cmake-command-line-d-and-using-defined/2264/6 :
I use |
Ugh. Will need some time to upgrade... |
File
File
File
Transition to Qt6 introduces regression: webview data is now lost on app restart. |
|
To make webview storage persistent, you have to make the following changes in
|
|
Took a while for personal reasons. Qt version is being switched by |
|
I love you so much. That was my fault. I', really sorry) |
Just in case someone needs it, a working Qt5 backend.
I am not a C++ developer, so the code can contain flaws. Please feel free to criticize or discard.
I used Qt5,
and not Qt6(now supported as well) , because my own projects is yet based on version 5.Since the whole project targets CMake 3.16, some of the directives (-fPIC) are provided as raw compiler flags, not the CMake properties (these did not work for me).