Skip to content

Commit

Permalink
Cleanup ahead of release
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed May 23, 2023
1 parent cb6bcde commit cccdfd2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)!)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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!

Expand Down
4 changes: 3 additions & 1 deletion crates/eframe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions crates/eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}"));
/// });
/// })
/// }
Expand Down
1 change: 1 addition & 0 deletions crates/egui_demo_app/src/backend_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

Expand Down
11 changes: 4 additions & 7 deletions crates/egui_demo_app/src/web.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use eframe::{
wasm_bindgen::{self, prelude::*},
web::WebRunner,
};
use eframe::wasm_bindgen::{self, prelude::*};

use crate::WrapApp;

/// Our handle to the web app from JavaScript.
#[derive(Clone)]
#[wasm_bindgen]
pub struct WebHandle {
runner: WebRunner,
runner: eframe::WebRunner,
}

#[wasm_bindgen]
Expand All @@ -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(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_simple/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"));
});
})
}

0 comments on commit cccdfd2

Please sign in to comment.