On macOS and Windows, use winit's `Window::theme()` instead of
dark-light, to detect the theme.
Always react to WindowEvent::ThemeChange. It's delivered on macOS,
Windows, and the web.
The CI build vsix panics on line 84 in glcontext.rs. There's no unwrap()
there but there's one nearby. I wasn't able to reproduce this with a
local build, so this is a prospective attempt, assuming that this is due
to the attempt of glx-over-egl display configuration finding.
Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult
(Also renamed buffer_stride to pixel_stride)
Closes#2135
As the surface creation may fail with Egl later, then display preference
EglThenGlx is not sufficient and we need to completely re-do the glutin
initialization and try with GLX.
cc #2162
Use a CStr instead of str, to avoid an extra CString allocation. The underlying operating system API for
this expects a zero terminated C String.
Fixes#1943
Return the path events for rendering as an Option, so that if the path is empty,
we simply return.
This avoids a double property dependency in the (likely) event the path is not empty.
Don't rely on the pen not being set when drawing the background of a rectangle
with transparent border. On my machine with the test case the pen has some other
color from previous drawing (or Qt internal?).
* Text only StandardTableView with column and rows
* Text editing of cells
* Sort by column ascending and descending
* Variants of the TableView for native, fluent and material
As suggested by @wengxt, we should always clear the preedit when instructed by the IME (via
an empty preedit string). We do that with winit, too.
Relates to #1925
Make with_graphics_api robus by ensuring that the context is always current (similar to commit a124f4b8fe)
and remove the with_current_context boilerplate.
Instead of the ClippedImage. Because we use the colorize property more
often than the source property, and these are soon going to be even more
expensive
Commit f66a2a5775 and dc048a11db introduced
the regression of issue #1985 where in adjust_rect_and_border_for_inner_drawing
instead of subtracting the entire border width from the size,
only half of it was subtracted,
leaving an inner area of the rectangle visible.
Fixes#1985
We need to check the original size of the canvas before winit override it
The previous code didn't work for two reason
- It was done after winit had reset the size of the canvas to the
default size
- It just calls set_inner_size on the winit Window, which is not what we want,
we want to call the api::Window::set_size funciton so it can keep all
different sizes in sync