mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
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:
parent
9b63854cd0
commit
86ea2641f8
5 changed files with 208 additions and 158 deletions
|
@ -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 }
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue