Skip to content

Commit

Permalink
Update egui to 0.27.2 (#121)
Browse files Browse the repository at this point in the history
* merge: merge from upstream egui 0.27.2

* chore: update other deps and fix compilation errors

* fix: repatch eframe's `request_animation_frame` method

* chore: update winit to a non-yanked version

* chore: remove invisible scroll bars from tab viewer

* chore: clippy

* fix: fix integration of eframe's alt-tab detection in web builds
  • Loading branch information
white-axe authored Apr 6, 2024
1 parent 0c32665 commit fd24f72
Show file tree
Hide file tree
Showing 26 changed files with 515 additions and 278 deletions.
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ categories = ["games"]

# Shared dependencies
[workspace.dependencies]
egui = "0.26.2"
egui_extras = { version = "0.26.2", features = ["svg", "image"] }
epaint = "0.26.2"
egui = "0.27.2"
egui_extras = { version = "0.27.2", features = ["svg", "image"] }
epaint = "0.27.2"

luminol-eframe = { version = "0.4.0", path = "crates/eframe/", features = [
"wgpu",
Expand All @@ -73,7 +73,7 @@ luminol-eframe = { version = "0.4.0", path = "crates/eframe/", features = [
"wayland",
], default-features = false }
luminol-egui-wgpu = { version = "0.4.0", path = "crates/egui-wgpu/" }
egui-winit = "0.26.2"
egui-winit = "0.27.2"

wgpu = { version = "0.19.1", features = ["naga-ir"] }
glam = { version = "0.24.2", features = ["bytemuck"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ workspace = true
[dependencies]
egui.workspace = true

egui_dock = "0.11.2"
egui-notify = "0.13.0"
egui-modal = "0.3.4"
egui_dock = "0.12.0"
egui-notify = "0.14.0"
egui-modal = "0.3.6"

poll-promise.workspace = true
once_cell.workspace = true
Expand Down
43 changes: 18 additions & 25 deletions crates/core/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,24 @@ impl Tabs {
ui: &mut egui::Ui,
update_state: &mut crate::UpdateState<'_>,
) {
// This scroll area with hidden scrollbars is a hacky workaround for
// https://github.com/Adanos020/egui_dock/issues/90
// which, for us, seems to manifest when the user moves tabs around
egui::ScrollArea::vertical()
.scroll_bar_visibility(egui::scroll_area::ScrollBarVisibility::AlwaysHidden)
.show(ui, |ui| {
let mut style = egui_dock::Style::from_egui(ui.style());
style.overlay.surface_fade_opacity = 1.;

let focused_id = ui
.memory(|m| m.focus().is_none())
.then_some(self.dock_state.find_active_focused().map(|(_, t)| t.id()))
.flatten();
egui_dock::DockArea::new(&mut self.dock_state)
.id(self.id)
.style(style)
.show_inside(
ui,
&mut TabViewer {
update_state,
focused_id,
allowed_in_windows: self.allowed_in_windows,
},
);
});
let mut style = egui_dock::Style::from_egui(ui.style());
style.overlay.surface_fade_opacity = 1.;

let focused_id = ui
.memory(|m| m.focused().is_none())
.then_some(self.dock_state.find_active_focused().map(|(_, t)| t.id()))
.flatten();
egui_dock::DockArea::new(&mut self.dock_state)
.id(self.id)
.style(style)
.show_inside(
ui,
&mut TabViewer {
update_state,
focused_id,
allowed_in_windows: self.allowed_in_windows,
},
);
}

/// Display all tabs.
Expand Down
Loading

0 comments on commit fd24f72

Please sign in to comment.