Skip to content

Commit

Permalink
Update egui to 0.26.2 (#110)
Browse files Browse the repository at this point in the history
* merge: merge into eframe and egui-wgpu from upstream egui 0.26.2

* chore: update other dependencies

* chore: fix compilation errors caused by the update

* chore: update the upstream commit at the tops of the READMEs

* chore: fix wasm32 compilation errors

* fix: fix database editor combo boxes not truncating text

* fix: use normalized URL to determine if requests in sw.js should be cached
  • Loading branch information
white-axe authored Feb 20, 2024
1 parent 6171f26 commit 2e404a7
Show file tree
Hide file tree
Showing 26 changed files with 534 additions and 226 deletions.
54 changes: 29 additions & 25 deletions Cargo.lock

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

14 changes: 9 additions & 5 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.25.0"
egui_extras = { version = "0.25.0", features = ["svg", "image"] }
epaint = "0.25.0"
egui = "0.26.2"
egui_extras = { version = "0.26.2", features = ["svg", "image"] }
epaint = "0.26.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.25.0"
egui-winit = "0.26.2"

wgpu = { version = "0.19.1", features = ["naga-ir"] }
glam = { version = "0.24.2", features = ["bytemuck"] }
Expand All @@ -97,9 +97,13 @@ paste = "1.0.14"
thiserror = "1.0.37"
bitflags = "2.4.0"
color-eyre = "0.6.2"
puffin = "0.18"

puffin = "0.19"
raw-window-handle = "0.6.0"
winit = { version = "0.29.4", default-features = false }
log = { version = "0.4", features = ["std"] }
document-features = "0.2.8"
web-time = "0.2"

parking_lot = { version = "0.12.1", features = [
"nightly", # This is required for parking_lot to work properly in WebAssembly builds with atomics support
Expand Down
4 changes: 2 additions & 2 deletions assets/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if (typeof window === 'undefined') {
});

// Auto-cache non-error, non-opaque responses for all same-origin requests other than buildinfo.json
if (response.type === "error" || new URL(request.url).origin !== self.origin || request.url.endsWith('/buildinfo.json')) {
if (response.type === "error" || url.origin !== self.origin || url.pathname.endsWith("/buildinfo.json")) {
return newResponse;
} else {
return self.caches
Expand All @@ -116,7 +116,7 @@ if (typeof window === 'undefined') {
}
})
.catch((e) => {
if (!request.url.endsWith('/buildinfo.json')) {
if (!url.pathname.endsWith("/buildinfo.json")) {
console.error(e);
}
})
Expand Down
6 changes: 6 additions & 0 deletions crates/components/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ where
.width(ui.available_width() - ui.spacing().item_spacing.x)
.selected_text(self.reference.to_string())
.show_ui(ui, |ui| {
ui.style_mut().wrap = Some(true);

for (i, variant) in T::iter().enumerate() {
ui.with_stripe(i % 2 != 0, |ui| {
if ui
Expand Down Expand Up @@ -364,6 +366,8 @@ where
}
},
|this, ui, ids, first_row_is_faint, show_none| {
ui.style_mut().wrap = Some(true);

if show_none
&& ui
.with_stripe(false, |ui| {
Expand Down Expand Up @@ -418,6 +422,8 @@ where
ui,
|this| (this.formatter)(*this.reference),
|this, ui, ids, first_row_is_faint, _| {
ui.style_mut().wrap = Some(true);

let mut is_faint = first_row_is_faint;

for id in ids {
Expand Down
4 changes: 2 additions & 2 deletions crates/components/src/map_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl MapView {
if let Some(pos) = response.hover_pos() {
// We need to store the old scale before applying any transformations
let old_scale = self.scale;
let delta = ui.input(|i| i.scroll_delta.y);
let delta = ui.input(|i| i.smooth_scroll_delta.y);

// Apply scroll and cap max zoom to 15%
self.scale *= (delta / 9.0f32.exp2()).exp2();
Expand Down Expand Up @@ -509,7 +509,7 @@ impl MapView {
5.,
egui::Stroke::new(1., egui::Color32::WHITE),
),
}
};
});

if let Some(hover_tile) = self.hover_tile {
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.10.0"
egui-notify = "0.12.0"
egui-modal = "0.3.2"
egui_dock = "0.11.2"
egui-notify = "0.13.0"
egui-modal = "0.3.4"

poll-promise.workspace = true
once_cell.workspace = true
Expand Down
26 changes: 26 additions & 0 deletions crates/eframe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.26.2 - 2024-02-14
* Add `winuser` feature to `winapi` to fix unresolved import [#4037](https://github.com/emilk/egui/pull/4037) (thanks [@varphone](https://github.com/varphone)!)


## 0.26.1 - 2024-02-11
* Fix high CPU usage on Windows when app is minimized [#3985](https://github.com/emilk/egui/pull/3985) (thanks [@rustbasic](https://github.com/rustbasic)!)
* Update to document-features 0.2.8 [#4003](https://github.com/emilk/egui/pull/4003)


## 0.26.0 - 2024-02-05
* Update `wgpu` to 0.19 [#3824](https://github.com/emilk/egui/pull/3824)
* Disable the default features of `wgpu` [#3875](https://github.com/emilk/egui/pull/3875)
* Much more accurate `cpu_usage` timing [#3913](https://github.com/emilk/egui/pull/3913)
* Update to puffin 0.19 [#3940](https://github.com/emilk/egui/pull/3940)

#### Desktop/Native:
* Keep `ViewportInfo::maximized` and `minimized` up-to-date on Windows [#3831](https://github.com/emilk/egui/pull/3831) (thanks [@rustbasic](https://github.com/rustbasic)!)
* Handle `IconData::default()` without crashing [#3842](https://github.com/emilk/egui/pull/3842)
* Fix Android crash on resume [#3847](https://github.com/emilk/egui/pull/3847) [#3867](https://github.com/emilk/egui/pull/3867) (thanks [@Garoven](https://github.com/Garoven)!)
* Add `WgpuConfiguration::desired_maximum_frame_latency` [#3874](https://github.com/emilk/egui/pull/3874)
* Don't call `App::update` on minimized windows [#3877](https://github.com/emilk/egui/pull/3877) (thanks [@rustbasic](https://github.com/rustbasic)!)

#### Web:
* When using `wgpu` on web, `eframe` will try to use WebGPU if available, then fall back to WebGL [#3824](https://github.com/emilk/egui/pull/3824) [#3895](https://github.com/emilk/egui/pull/3895) (thanks [@Wumpf](https://github.com/Wumpf)!)


## 0.25.0 - 2024-01-08
* If both `glow` and `wgpu` features are enabled, default to `wgpu` [#3717](https://github.com/emilk/egui/pull/3717)

Expand Down
Loading

0 comments on commit 2e404a7

Please sign in to comment.