The variable "geometry_changed" was true when the geometry was not updated.
Rename the variable and make it sure it has a proper meaning.
(Doesn't change the logic of the program)
Use the new fontdb API:
* When registering embedded fonts, we don't need to make a copy of the
embedded font data anymore.
* We don't have to mmap the font files ourselves anymore, fontdb can
do this now for us.
Don't apply constraints to the winit window if we're in fullscreen mode,
as that might result in us allocating a surface that's bigger than the
screen, which in turn may result in the process exiting right away.
Fixes#532
- The Tab must be drawn before the contents, because the style draws something under the active tab,
outside of its region
- Also set the QStyleOptionTab::HasFrame flag since we are in the equivalent of a QTabWidget
Some styles recompute the size based on the contents given in the QStyleOptionButton,
Some styles need to be given the icon in their content size. And this was not done properly
Various third-party bumps and femtovg bumped to include a fix for exact
GLES 2.0 detection. Glutin may give us a 3.x GLES context even if we ask
for 2.0 (https://github.com/rust-windowing/glutin/issues/1282) and I can
reproduce that for example on Raspbian with MESA. But femtovg should
work with both, hence the update.
It works with the Qt backend, and it should work with the GL backend as
well. usvg supports it, uses the same underlying shaper and the API even
allows sharing the font database.
We just need to adjust the priority of the default binding to be a high value
(eg, less priority) since the other values must always win.
This fixes the placeholder text color
We default to querying GlLatest from glutin, which might run into a code
path in glutin's `bind_and_get_api` in `egl/mod.rs` that will return
None as version and pass that to `choose_fbconfig`. That function will
panic with unimplemented() if the bound API is GLES, because we need to
know which version of GLES. The bound API in turn might be GLES if
desktop GL is not supported.
To accomodate for this situation, this patch changes the GL context
creation logic to first try explicitly GLES 2.0 and then fall back to
the GlLatest variants.
In addition this pulls in a newer version of femtovg to fix FBO
rendering with stencil with GLES 2.0.
This version doesn't require the change to fontdb yet, but uses the new
femtovg API to allow feeding in shared (mmapped) font data. On macOS
this saves 4-5 MB of ram just for the gallery, on my default Ubuntu it's
roughly ~40MB.
The synthetic window we "inject" in the ensure_window() pass did not
have the window-background from the style applied. This is visible
for example when viewing something like
Rectangle { background: blue; border-radius: height / 2 }