mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Unpin & upgrade winit to 0.30.5 (#4939)
This updates winit to 0.30.5. https://github.com/emilk/egui/pull/4849 Had to pin the version to 0.30.2, as a Winit patch changed the behavior of selecting a theme. Winit 0.30.5 reverts this, so we could stick with `window.theme()`, but the newly added `ActiveEventLoop::system_theme` is more like what egui wants anyway, as individual windows can have theme overrides. Also bump `smithay-clipboard` to prevent some now duplicate dependencies.
This commit is contained in:
@@ -1114,7 +1114,7 @@ impl GlutinWindowContext {
|
||||
viewport_id,
|
||||
event_loop,
|
||||
Some(window.scale_factor() as f32),
|
||||
window.theme(),
|
||||
event_loop.system_theme(),
|
||||
self.max_texture_side,
|
||||
)
|
||||
});
|
||||
|
||||
@@ -241,7 +241,7 @@ impl WgpuWinitApp {
|
||||
ViewportId::ROOT,
|
||||
event_loop,
|
||||
Some(window.scale_factor() as f32),
|
||||
window.theme(),
|
||||
event_loop.system_theme(),
|
||||
painter.max_texture_side(),
|
||||
);
|
||||
|
||||
@@ -869,7 +869,7 @@ impl Viewport {
|
||||
viewport_id,
|
||||
event_loop,
|
||||
Some(window.scale_factor() as f32),
|
||||
window.theme(),
|
||||
event_loop.system_theme(),
|
||||
painter.max_texture_side(),
|
||||
));
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ serde = { workspace = true, optional = true }
|
||||
webbrowser = { version = "1.0.0", optional = true }
|
||||
|
||||
[target.'cfg(any(target_os="linux", target_os="dragonfly", target_os="freebsd", target_os="netbsd", target_os="openbsd"))'.dependencies]
|
||||
smithay-clipboard = { version = "0.7.0", optional = true }
|
||||
smithay-clipboard = { version = "0.7.2", optional = true }
|
||||
|
||||
# The wayland-cursor normally selected doesn't properly enable all the features it uses
|
||||
# and thus doesn't compile as it is used in egui-winit. This is fixed upstream, so force
|
||||
|
||||
@@ -192,8 +192,7 @@ impl winit::application::ApplicationHandler<UserEvent> for GlowApp {
|
||||
let gl = std::sync::Arc::new(gl);
|
||||
gl_window.window().set_visible(true);
|
||||
|
||||
let egui_glow =
|
||||
egui_glow::EguiGlow::new(event_loop, &gl_window.window, gl.clone(), None, None, true);
|
||||
let egui_glow = egui_glow::EguiGlow::new(event_loop, gl.clone(), None, None, true);
|
||||
|
||||
let event_loop_proxy = egui::mutex::Mutex::new(self.proxy.clone());
|
||||
egui_glow
|
||||
|
||||
@@ -24,7 +24,6 @@ impl EguiGlow {
|
||||
/// For automatic shader version detection set `shader_version` to `None`.
|
||||
pub fn new(
|
||||
event_loop: &winit::event_loop::ActiveEventLoop,
|
||||
window: &winit::window::Window,
|
||||
gl: std::sync::Arc<glow::Context>,
|
||||
shader_version: Option<ShaderVersion>,
|
||||
native_pixels_per_point: Option<f32>,
|
||||
@@ -43,7 +42,7 @@ impl EguiGlow {
|
||||
ViewportId::ROOT,
|
||||
event_loop,
|
||||
native_pixels_per_point,
|
||||
window.theme(),
|
||||
event_loop.system_theme(),
|
||||
Some(painter.max_texture_side()),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user