servoshell: Update egui to 0.32 (#38119)

We also need to bump egui-file-dialog and accesskit_winit. Changes are
done based on migration paths provided by egui.

Testing: No tests for servoshell
Fixes: #38117

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-07-16 21:42:16 +02:00 committed by GitHub
parent 9b63854cd0
commit 86ea2641f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 208 additions and 158 deletions

View file

@ -106,12 +106,12 @@ serde_json = { workspace = true }
surfman = { workspace = true, features = ["sm-angle-default"] }
[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
accesskit_winit = "0.23"
accesskit_winit = "0.27"
dirs = "6.0"
egui = { version = "0.31.1", features = ["accesskit"] }
egui-file-dialog = "0.9.0"
egui-winit = { version = "0.31.1", default-features = false, features = ["accesskit", "clipboard", "wayland"] }
egui_glow = { version = "0.31.1", features = ["winit"] }
egui = { version = "0.32.0", features = ["accesskit"] }
egui-file-dialog = "0.11.0"
egui-winit = { version = "0.32.0", default-features = false, features = ["accesskit", "clipboard", "wayland"] }
egui_glow = { version = "0.32.0", features = ["winit"] }
gilrs = "0.11.0"
glow = "0.16.0"
headers = { workspace = true }

View file

@ -81,7 +81,7 @@ impl EguiGlow {
None,
);
let window = window.winit_window().unwrap();
egui_winit.init_accesskit(window, event_loop_proxy);
egui_winit.init_accesskit(event_loop, window, event_loop_proxy);
window.set_visible(true);
Self {
egui_winit,

View file

@ -11,8 +11,7 @@ use dpi::PhysicalSize;
use egui::text::{CCursor, CCursorRange};
use egui::text_edit::TextEditState;
use egui::{
CentralPanel, Frame, Key, Label, Modifiers, PaintCallback, SelectableLabel, TopBottomPanel,
Vec2, pos2,
Button, CentralPanel, Frame, Key, Label, Modifiers, PaintCallback, TopBottomPanel, Vec2, pos2,
};
use egui_glow::CallbackFn;
use egui_winit::EventResponse;
@ -228,7 +227,7 @@ impl Minibrowser {
visuals.widgets.inactive.corner_radius = corner_radius;
let selected = webview.focused();
let tab = ui.add(SelectableLabel::new(
let tab = ui.add(Button::selectable(
selected,
truncate_with_ellipsis(&label, 20),
));
@ -419,13 +418,14 @@ impl Minibrowser {
ui.allocate_space(size);
if let Some(status_text) = &self.status_text {
egui::containers::popup::show_tooltip_at(
ctx,
egui::Tooltip::always_open(
ctx.clone(),
ui.layer_id(),
"tooltip layer".into(),
pos2(0.0, ctx.available_rect().max.y),
|ui| ui.add(Label::new(status_text.clone()).extend()),
);
)
.show(|ui| ui.add(Label::new(status_text.clone()).extend()))
.map(|response| response.inner);
}
state.repaint_servo_if_necessary();