Browse Source

Cleanup ahead of release

pull/3026/head
Emil Ernerfeldt 1 year ago
parent
commit
cccdfd246e
  1. 6
      CHANGELOG.md
  2. 4
      README.md
  3. 4
      crates/eframe/CHANGELOG.md
  4. 6
      crates/eframe/src/lib.rs
  5. 1
      crates/egui_demo_app/src/backend_panel.rs
  6. 11
      crates/egui_demo_app/src/web.rs
  7. 2
      examples/hello_world_simple/src/main.rs

6
CHANGELOG.md

@ -4,7 +4,7 @@ All notable changes to the `egui` crate will be documented in this file.
NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG.md), [`egui-winit`](crates/egui-winit/CHANGELOG.md), [`egui_glium`](crates/egui_glium/CHANGELOG.md), [`egui_glow`](crates/egui_glow/CHANGELOG.md) and [`egui-wgpu`](crates/egui-wgpu/CHANGELOG.md) have their own changelogs!
## Unreleased
## Unreleased - A plethora of small improvements
### ⭐ Added
* Scroll bar visibility options [#2729](https://github.com/emilk/egui/pull/2729) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!)
* Add `Grid::with_row_color` [#2519](https://github.com/emilk/egui/pull/2519) (thanks [@imgurbot12](https://github.com/imgurbot12)!)
@ -13,12 +13,12 @@ NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG
* Return plot transforms [#2935](https://github.com/emilk/egui/pull/2935)
* Add `Pointer::is_decidedly_dragging` and `could_any_button_be_click` [#2979](https://github.com/emilk/egui/pull/2979)
* Plot widget - allow disabling zoom and drag for x and y separately [#2901](https://github.com/emilk/egui/pull/2901) (thanks [@OmegaJak](https://github.com/OmegaJak)!)
* Add character limit to TextEdit [#2816](https://github.com/emilk/egui/pull/2816) (thanks [@wzid](https://github.com/wzid)!)
* Add character limit to `TextEdit` [#2816](https://github.com/emilk/egui/pull/2816) (thanks [@wzid](https://github.com/wzid)!)
* Add `egui::Modifiers::contains` [#2989](https://github.com/emilk/egui/pull/2989) (thanks [@Wumpf](https://github.com/Wumpf)!)
### 🔧 Changed
* Transpose the value/satuation panel of the color picker [#2727](https://github.com/emilk/egui/pull/2727) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!)
* Improve vertical alignment of fonts [#2724](https://github.com/emilk/egui/pull/2724) (thanks [@lictex](https://github.com/lictex)!)
* Transpose the value/satuation panel of the color picker [#2727](https://github.com/emilk/egui/pull/2727) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!)
* Replace `ComboBox::show_index` `String` with `Into<TextWidget>` [#2790](https://github.com/emilk/egui/pull/2790) (thanks [@tosti007](https://github.com/tosti007)!)
* Replace `tracing` with `log` [#2928](https://github.com/emilk/egui/pull/2928)
* Only show id clash warnings in debug builds by default [#2930](https://github.com/emilk/egui/pull/2930)

4
README.md

@ -45,7 +45,7 @@ ui.add(egui::Slider::new(&mut age, 0..=120).text("age"));
if ui.button("Click each year").clicked() {
age += 1;
}
ui.label(format!("Hello '{}', age {}", name, age));
ui.label(format!("Hello '{name}', age {age}"));
```
<img src="media/demo.gif">
@ -70,7 +70,7 @@ The native backend is [`egui_glow`](https://github.com/emilk/egui/tree/master/cr
On Fedora Rawhide you need to run:
`dnf install clang clang-devel clang-tools-extra libxkbcommon-devel pkg-config openssl-devel libxcb-devel gtk3-devel atk`
`dnf install clang clang-devel clang-tools-extra libxkbcommon-devel pkg-config openssl-devel libxcb-devel gtk3-devel atk fontconfig-devel`
**NOTE**: This is just for the demo app - egui itself is completely platform agnostic!

4
crates/eframe/CHANGELOG.md

@ -31,8 +31,10 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
#### Web:
* Prefer the client width/height for the canvas parent [#2804](https://github.com/emilk/egui/pull/2804) (thanks [@samitbasu](https://github.com/samitbasu)!)
* ⚠️ BREAKING: `eframe::start_web` has been replaced with `eframe::WebRunner`, which also installs a nice panic hook (no need for `console_error_panic_hook`).
* ⚠️ BREAKING: WebGPU is now the default web renderer when using the `wgpu` feature of `eframe`. To use WebGL with `wgpu`, you need to add `wgpu = { version = "0.16.0", features = ["webgl"] }` to your own `Cargo.toml`. ([#2945](https://github.com/emilk/egui/pull/2945))
* Add `eframe::WebLogger` for redirecting `log` calls to the web console (`console.log`).
* Prefer the client width/height for the canvas parent [#2804](https://github.com/emilk/egui/pull/2804) (thanks [@samitbasu](https://github.com/samitbasu)!)
* eframe web: Persist app state to local storage when leaving site [#2927](https://github.com/emilk/egui/pull/2927)
* Better panic handling [#2942](https://github.com/emilk/egui/pull/2942) [#2992](https://github.com/emilk/egui/pull/2992)
* Update wasm-bindgen to 0.2.86 [#2995](https://github.com/emilk/egui/pull/2995)

6
crates/eframe/src/lib.rs

@ -61,7 +61,7 @@
//! #[wasm_bindgen(constructor)]
//! pub fn new() -> Self {
//! // Redirect [`log`] message to `console.log` and friends:
//! eframe::web::WebLogger::init(log::LevelFilter::Debug).ok();
//! eframe::WebLogger::init(log::LevelFilter::Debug).ok();
//!
//! Self {
//! runner: WebRunner::new(),
@ -150,7 +150,7 @@ pub use web_sys;
pub mod web;
#[cfg(target_arch = "wasm32")]
pub use web::WebRunner;
pub use web::{WebLogger, WebRunner};
// ----------------------------------------------------------------------------
// When compiling natively
@ -254,7 +254,7 @@ pub fn run_native(
/// if ui.button("Click each year").clicked() {
/// age += 1;
/// }
/// ui.label(format!("Hello '{}', age {}", name, age));
/// ui.label(format!("Hello '{name}', age {age}"));
/// });
/// })
/// }

1
crates/egui_demo_app/src/backend_panel.rs

@ -148,6 +148,7 @@ impl BackendPanel {
#[cfg(target_arch = "wasm32")]
ui.collapsing("Web info (location)", |ui| {
ui.style_mut().wrap = Some(false);
ui.monospace(format!("{:#?}", frame.info().web_info.location));
});

11
crates/egui_demo_app/src/web.rs

@ -1,7 +1,4 @@
use eframe::{
wasm_bindgen::{self, prelude::*},
web::WebRunner,
};
use eframe::wasm_bindgen::{self, prelude::*};
use crate::WrapApp;
@ -9,7 +6,7 @@ use crate::WrapApp;
#[derive(Clone)]
#[wasm_bindgen]
pub struct WebHandle {
runner: WebRunner,
runner: eframe::WebRunner,
}
#[wasm_bindgen]
@ -19,10 +16,10 @@ impl WebHandle {
#[wasm_bindgen(constructor)]
pub fn new() -> Self {
// Redirect [`log`] message to `console.log` and friends:
eframe::web::WebLogger::init(log::LevelFilter::Debug).ok();
eframe::WebLogger::init(log::LevelFilter::Debug).ok();
Self {
runner: WebRunner::new(),
runner: eframe::WebRunner::new(),
}
}

2
examples/hello_world_simple/src/main.rs

@ -26,7 +26,7 @@ fn main() -> Result<(), eframe::Error> {
if ui.button("Click each year").clicked() {
age += 1;
}
ui.label(format!("Hello '{}', age {}", name, age));
ui.label(format!("Hello '{name}', age {age}"));
});
})
}

Loading…
Cancel
Save