Release 0.16.0 - Context menus and rich text

This commit is contained in:
Emil Ernerfeldt 2021-12-29 12:07:05 +01:00
parent 77869c21ea
commit 0146c7e7fc
21 changed files with 115 additions and 84 deletions

View file

@ -7,32 +7,36 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
## Unreleased ## Unreleased
## 0.16.0 - 2021-12-29 - Context menus and rich text
### Added ⭐ ### Added ⭐
* Add context menus: See `Ui::menu_button` and `Response::context_menu` ([#543](https://github.com/emilk/egui/pull/543)). * Added context menus: See `Ui::menu_button` and `Response::context_menu` ([#543](https://github.com/emilk/egui/pull/543)).
* Most widgets containing text (`Label`, `Button` etc) now supports rich text ([#855](https://github.com/emilk/egui/pull/855)). * Most widgets containing text (`Label`, `Button` etc) now supports rich text ([#855](https://github.com/emilk/egui/pull/855)).
* Plots: * Plots:
* Add bar charts and box plots ([#863](https://github.com/emilk/egui/pull/863)). * Added bar charts and box plots ([#863](https://github.com/emilk/egui/pull/863)).
* You can now query information about the plot (e.g. get the mouse position in plot coordinates, or the plot * You can now query information about the plot (e.g. get the mouse position in plot coordinates, or the plot
bounds) while adding items. `Plot` ([#766](https://github.com/emilk/egui/pull/766) and bounds) while adding items. `Plot` ([#766](https://github.com/emilk/egui/pull/766) and
[#892](https://github.com/emilk/egui/pull/892)). [#892](https://github.com/emilk/egui/pull/892)).
* You can now read and write the cursor of a `TextEdit` ([#848](https://github.com/emilk/egui/pull/848)). * You can now read and write the cursor of a `TextEdit` ([#848](https://github.com/emilk/egui/pull/848)).
* When using a custom font you can now specify a font index ([#873](https://github.com/emilk/egui/pull/873)). * When using a custom font you can now specify a font index ([#873](https://github.com/emilk/egui/pull/873)).
* Add vertical sliders with `Slider::new(…).vertical()` ([#875](https://github.com/emilk/egui/pull/875)). * Added vertical sliders with `Slider::new(…).vertical()` ([#875](https://github.com/emilk/egui/pull/875)).
* Add `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)). * Added `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)).
* Add `CollapsingHeader::open` to control if it is open or collapsed ([#1006](https://github.com/emilk/egui/pull/1006)). * Added `CollapsingHeader::open` to control if it is open or collapsed ([#1006](https://github.com/emilk/egui/pull/1006)).
* Added `egui::widgets::color_picker::color_picker_color32` to show the color picker.
### Changed 🔧 ### Changed 🔧
* MSRV (Minimum Supported Rust Version) is now `1.56.0`. * MSRV (Minimum Supported Rust Version) is now `1.56.0`.
* `ui.add(Button::new("…").text_color(…))` is now `ui.button(RichText::new("…").color(…))` (same for `Label` )([#855](https://github.com/emilk/egui/pull/855)). * `ui.add(Button::new("…").text_color(…))` is now `ui.button(RichText::new("…").color(…))` (same for `Label` )([#855](https://github.com/emilk/egui/pull/855)).
* Plots now provide a `show` method that has to be used to add items to and show the plot ([#766](https://github.com/emilk/egui/pull/766)). * Plots now provide a `show` method that has to be used to add items to and show the plot ([#766](https://github.com/emilk/egui/pull/766)).
* Replace `CtxRef::begin_frame` and `end_frame` with `CtxRef::run` ([#872](https://github.com/emilk/egui/pull/872)).
* Replace `scroll_delta` and `zoom_delta` in `RawInput` with `Event::Scroll` and `Event::Zoom`.
* Unifiy the four `Memory` data buckets (`data`, `data_temp`, `id_data` and `id_data_temp`) into a single `Memory::data`, with a new interface ([#836](https://github.com/emilk/egui/pull/836)).
* Replace `Ui::__test` with `egui::__run_test_ui` ([#872](https://github.com/emilk/egui/pull/872)).
* `menu::menu(ui, ...)` is now `ui.menu_button(...)` ([#543](https://github.com/emilk/egui/pull/543)) * `menu::menu(ui, ...)` is now `ui.menu_button(...)` ([#543](https://github.com/emilk/egui/pull/543))
* Replaced `CtxRef::begin_frame` and `end_frame` with `CtxRef::run` ([#872](https://github.com/emilk/egui/pull/872)).
* Replaced `scroll_delta` and `zoom_delta` in `RawInput` with `Event::Scroll` and `Event::Zoom`.
* Unified the four `Memory` data buckets (`data`, `data_temp`, `id_data` and `id_data_temp`) into a single `Memory::data`, with a new interface ([#836](https://github.com/emilk/egui/pull/836)).
* Replaced `Ui::__test` with `egui::__run_test_ui` ([#872](https://github.com/emilk/egui/pull/872)).
### Fixed 🐛 ### Fixed 🐛
* Fix `ComboBox` and other popups getting clipped to parent window ([#885](https://github.com/emilk/egui/pull/885)). * Fixed `ComboBox` and other popups getting clipped to parent window ([#885](https://github.com/emilk/egui/pull/885)).
* The color picker is now better att keeping the same hue even when saturation goes to zero ([#886](https://github.com/emilk/egui/pull/886)). * The color picker is now better att keeping the same hue even when saturation goes to zero ([#886](https://github.com/emilk/egui/pull/886)).
### Removed 🔥 ### Removed 🔥
@ -40,16 +44,19 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
* Removed `egui::paint` (use `egui::epaint` instead). * Removed `egui::paint` (use `egui::epaint` instead).
### Contributors 🙏 ### Contributors 🙏
* [5225225](https://github.com/5225225): ([#849](https://github.com/emilk/egui/pull/849)). * [5225225](https://github.com/5225225): [#849](https://github.com/emilk/egui/pull/849).
* [B-Reif](https://github.com/B-Reif) ([#875](https://github.com/emilk/egui/pull/875)). * [aevyrie](https://github.com/aevyrie): [#966](https://github.com/emilk/egui/pull/966).
* [Bromeon](https://github.com/Bromeon): ([#863](https://github.com/emilk/egui/pull/863)). * [B-Reif](https://github.com/B-Reif): [#875](https://github.com/emilk/egui/pull/875).
* [d10sfan](https://github.com/d10sfan) ([#832](https://github.com/emilk/egui/pull/832)). * [Bromeon](https://github.com/Bromeon): [#863](https://github.com/emilk/egui/pull/863), [#918](https://github.com/emilk/egui/pull/918).
* [EmbersArc](https://github.com/EmbersArc): ([#766](https://github.com/emilk/egui/pull/766), [#892](https://github.com/emilk/egui/pull/892)). * [d10sfan](https://github.com/d10sfan): [#832](https://github.com/emilk/egui/pull/832).
* [Hperigo](https://github.com/Hperigo): ([#905](https://github.com/emilk/egui/pull/905)). * [EmbersArc](https://github.com/EmbersArc): [#766](https://github.com/emilk/egui/pull/766), [#892](https://github.com/emilk/egui/pull/892).
* [mankinskin](https://github.com/mankinskin) ([#543](https://github.com/emilk/egui/pull/543)). * [Hperigo](https://github.com/Hperigo): [#905](https://github.com/emilk/egui/pull/905).
* [niladic](https://github.com/niladic): ([#499](https://github.com/emilk/egui/pull/499), [#863](https://github.com/emilk/egui/pull/863)). * [isegal](https://github.com/isegal): [#934](https://github.com/emilk/egui/pull/934).
* [sumibi-yakitori](https://github.com/sumibi-yakitori) ([#830](https://github.com/emilk/egui/pull/830)). * [mankinskin](https://github.com/mankinskin): [#543](https://github.com/emilk/egui/pull/543).
* [t18b219k](https://github.com/t18b219k): ([#868](https://github.com/emilk/egui/pull/868), [#888](https://github.com/emilk/egui/pull/888)). * [niladic](https://github.com/niladic): [#499](https://github.com/emilk/egui/pull/499), [#863](https://github.com/emilk/egui/pull/863).
* [singalen](https://github.com/singalen): [#973](https://github.com/emilk/egui/pull/973).
* [sumibi-yakitori](https://github.com/sumibi-yakitori): [#830](https://github.com/emilk/egui/pull/830), [#870](https://github.com/emilk/egui/pull/870).
* [t18b219k](https://github.com/t18b219k): [#868](https://github.com/emilk/egui/pull/868), [#888](https://github.com/emilk/egui/pull/888).
## 0.15.0 - 2021-10-24 - Syntax highlighting and hscroll ## 0.15.0 - 2021-10-24 - Syntax highlighting and hscroll

22
Cargo.lock generated
View file

@ -776,7 +776,7 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf"
[[package]] [[package]]
name = "eframe" name = "eframe"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"egui", "egui",
"egui-winit", "egui-winit",
@ -790,7 +790,7 @@ dependencies = [
[[package]] [[package]]
name = "egui" name = "egui"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"ahash", "ahash",
"epaint", "epaint",
@ -801,7 +801,7 @@ dependencies = [
[[package]] [[package]]
name = "egui-winit" name = "egui-winit"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"copypasta", "copypasta",
"egui", "egui",
@ -814,7 +814,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_demo_app" name = "egui_demo_app"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"eframe", "eframe",
"egui_demo_lib", "egui_demo_lib",
@ -822,7 +822,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_demo_lib" name = "egui_demo_lib"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"criterion", "criterion",
@ -838,7 +838,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_glium" name = "egui_glium"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"egui", "egui",
"egui-winit", "egui-winit",
@ -849,7 +849,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_glow" name = "egui_glow"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"egui", "egui",
"egui-winit", "egui-winit",
@ -864,7 +864,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_web" name = "egui_web"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"egui", "egui",
"egui_glow", "egui_glow",
@ -899,7 +899,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"mint", "mint",
@ -942,7 +942,7 @@ dependencies = [
[[package]] [[package]]
name = "epaint" name = "epaint"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"ahash", "ahash",
@ -957,7 +957,7 @@ dependencies = [
[[package]] [[package]]
name = "epi" name = "epi"
version = "0.15.0" version = "0.16.0"
dependencies = [ dependencies = [
"directories-next", "directories-next",
"egui", "egui",

View file

@ -5,6 +5,9 @@ NOTE: [`egui_web`](egui_web/CHANGELOG.md), [`egui-winit`](egui-winit/CHANGELOG.m
## Unreleased ## Unreleased
## 0.16.0 - 2021-12-29
* `Frame` can now be cloned, saved, and passed to background threads ([#999](https://github.com/emilk/egui/pull/999)). * `Frame` can now be cloned, saved, and passed to background threads ([#999](https://github.com/emilk/egui/pull/999)).
* Added `Frame::request_repaint` to replace `repaint_signal` ([#999](https://github.com/emilk/egui/pull/999)). * Added `Frame::request_repaint` to replace `repaint_signal` ([#999](https://github.com/emilk/egui/pull/999)).
* Added `Frame::alloc_texture/free_texture` to replace `tex_allocator` ([#999](https://github.com/emilk/egui/pull/999)). * Added `Frame::alloc_texture/free_texture` to replace `tex_allocator` ([#999](https://github.com/emilk/egui/pull/999)).

View file

@ -1,6 +1,6 @@
[package] [package]
name = "eframe" name = "eframe"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "egui framework - write GUI apps that compiles to web and/or natively" description = "egui framework - write GUI apps that compiles to web and/or natively"
edition = "2021" edition = "2021"
@ -24,18 +24,18 @@ all-features = true
[lib] [lib]
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false } egui = { version = "0.16.0", path = "../egui", default-features = false }
epi = { version = "0.15.0", path = "../epi" } epi = { version = "0.16.0", path = "../epi" }
# native: # native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false } egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false }
egui_glium = { version = "0.15.0", path = "../egui_glium", default-features = false, features = ["clipboard", "epi", "links"], optional = true } egui_glium = { version = "0.16.0", path = "../egui_glium", default-features = false, features = ["clipboard", "epi", "links"], optional = true }
egui_glow = { version = "0.15.0", path = "../egui_glow", default-features = false, features = ["clipboard", "epi", "links", "winit"], optional = true } egui_glow = { version = "0.16.0", path = "../egui_glow", default-features = false, features = ["clipboard", "epi", "links", "winit"], optional = true }
# web: # web:
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
egui_web = { version = "0.15.0", path = "../egui_web", default-features = false } egui_web = { version = "0.16.0", path = "../egui_web", default-features = false }
[dev-dependencies] [dev-dependencies]
image = { version = "0.23", default-features = false, features = ["png"] } image = { version = "0.23", default-features = false, features = ["png"] }

View file

@ -4,9 +4,12 @@ All notable changes to the `egui-winit` integration will be noted in this file.
## Unreleased ## Unreleased
* Add helper `EpiIntegration` ([#871](https://github.com/emilk/egui/pull/871)).
* Fix shift key getting stuck enabled with the X11 option `shift:both_capslock` enabled ([#849](https://github.com/emilk/egui/pull/849)).
* Remove `State::is_quit_event` and `State::is_quit_shortcut` ([#881](https://github.com/emilk/egui/pull/881)). ## 0.16.0 - 2021-12-29
* Added helper `EpiIntegration` ([#871](https://github.com/emilk/egui/pull/871)).
* Fixed shift key getting stuck enabled with the X11 option `shift:both_capslock` enabled ([#849](https://github.com/emilk/egui/pull/849)).
* Removed `State::is_quit_event` and `State::is_quit_shortcut` ([#881](https://github.com/emilk/egui/pull/881)).
* Updated `winit` to 0.26 ([#930](https://github.com/emilk/egui/pull/930)). * Updated `winit` to 0.26 ([#930](https://github.com/emilk/egui/pull/930)).

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui-winit" name = "egui-winit"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui with winit" description = "Bindings for using egui with winit"
edition = "2021" edition = "2021"
@ -22,10 +22,10 @@ include = [
all-features = true all-features = true
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] } egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
winit = "0.26" winit = "0.26"
epi = { version = "0.15.0", path = "../epi", optional = true } epi = { version = "0.16.0", path = "../epi", optional = true }
copypasta = { version = "0.7", optional = true } copypasta = { version = "0.7", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] }

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui" name = "egui"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Simple, portable immediate mode GUI library for Rust" description = "Simple, portable immediate mode GUI library for Rust"
edition = "2021" edition = "2021"
@ -24,7 +24,7 @@ all-features = true
[lib] [lib]
[dependencies] [dependencies]
epaint = { version = "0.15.0", path = "../epaint", default-features = false } epaint = { version = "0.16.0", path = "../epaint", default-features = false }
ahash = "0.7" ahash = "0.7"
nohash-hasher = "0.2" nohash-hasher = "0.2"

View file

@ -44,6 +44,7 @@ fn background_checkers(painter: &Painter, rect: Rect) {
painter.add(Shape::mesh(mesh)); painter.add(Shape::mesh(mesh));
} }
/// Show a color with background checkers to demonstrate transparency (if any).
pub fn show_color(ui: &mut Ui, color: impl Into<Hsva>, desired_size: Vec2) -> Response { pub fn show_color(ui: &mut Ui, color: impl Into<Hsva>, desired_size: Vec2) -> Response {
show_hsva(ui, color.into(), desired_size) show_hsva(ui, color.into(), desired_size)
} }
@ -322,13 +323,15 @@ fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
} }
} }
/// Shows a color picker where the user can change the given color.
///
/// Returns `true` on change. /// Returns `true` on change.
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool { pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
let mut hsva = color_cache_get(ui.ctx(), *srgba); let mut hsva = color_cache_get(ui.ctx(), *srgba);
let response = color_picker_hsva_2d(ui, &mut hsva, alpha); let changed = color_picker_hsva_2d(ui, &mut hsva, alpha);
*srgba = Color32::from(hsva); *srgba = Color32::from(hsva);
color_cache_set(ui.ctx(), *srgba, hsva); color_cache_set(ui.ctx(), *srgba, hsva);
response changed
} }
pub fn color_edit_button_hsva(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> Response { pub fn color_edit_button_hsva(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> Response {

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui_demo_app" name = "egui_demo_app"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2021" edition = "2021"
@ -11,10 +11,10 @@ publish = false
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
eframe = { version = "0.15.0", path = "../eframe" } eframe = { version = "0.16.0", path = "../eframe" }
# eframe = { version = "0.15.0", path = "../eframe", default-features = false, features = ["default_fonts", "egui_glow"] } # eframe = { version = "0.16.0", path = "../eframe", default-features = false, features = ["default_fonts", "egui_glow"] }
egui_demo_lib = { version = "0.15.0", path = "../egui_demo_lib", features = ["extra_debug_asserts"] } egui_demo_lib = { version = "0.16.0", path = "../egui_demo_lib", features = ["extra_debug_asserts"] }
[features] [features]
default = ["persistence"] default = ["persistence"]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui_demo_lib" name = "egui_demo_lib"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Example library for egui" description = "Example library for egui"
edition = "2021" edition = "2021"
@ -24,8 +24,8 @@ all-features = true
[lib] [lib]
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false } egui = { version = "0.16.0", path = "../egui", default-features = false }
epi = { version = "0.15.0", path = "../epi" } epi = { version = "0.16.0", path = "../epi" }
chrono = { version = "0.4", features = ["js-sys", "wasmbind"], optional = true } chrono = { version = "0.4", features = ["js-sys", "wasmbind"], optional = true }
enum-map = { version = "1", features = ["serde"] } enum-map = { version = "1", features = ["serde"] }

View file

@ -3,10 +3,13 @@ All notable changes to the `egui_glium` integration will be noted in this file.
## Unreleased ## Unreleased
* Simplify `EguiGlium` interface ([#871](https://github.com/emilk/egui/pull/871)).
* Remove `EguiGlium::is_quit_event` ([#881](https://github.com/emilk/egui/pull/881)).
## 0.16.0 - 2021-12-29
* Simplified `EguiGlium` interface ([#871](https://github.com/emilk/egui/pull/871)).
* Removed `EguiGlium::is_quit_event` ([#881](https://github.com/emilk/egui/pull/881)).
* Updated `glium` to 0.31 ([#930](https://github.com/emilk/egui/pull/930)). * Updated `glium` to 0.31 ([#930](https://github.com/emilk/egui/pull/930)).
* Changed the `Painter` inteface slightly ([#999](https://github.com/emilk/egui/pull/999)). * Changed the `Painter` interface slightly ([#999](https://github.com/emilk/egui/pull/999)).
## 0.15.0 - 2021-10-24 ## 0.15.0 - 2021-10-24

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui_glium" name = "egui_glium"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui natively using the glium library" description = "Bindings for using egui natively using the glium library"
edition = "2021" edition = "2021"
@ -23,9 +23,9 @@ include = [
all-features = true all-features = true
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] } egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false, features = ["epi"] } egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false, features = ["epi"] }
epi = { version = "0.15.0", path = "../epi", optional = true } epi = { version = "0.16.0", path = "../epi", optional = true }
glium = "0.31" glium = "0.31"

View file

@ -3,11 +3,14 @@ All notable changes to the `egui_glow` integration will be noted in this file.
## Unreleased ## Unreleased
* Make winit/glutin an optional dependency ([#868](https://github.com/emilk/egui/pull/868)).
* Simplify `EguiGlow` interface ([#871](https://github.com/emilk/egui/pull/871)).
* Remove `EguiGlow::is_quit_event` ([#881](https://github.com/emilk/egui/pull/881)). ## 0.16.0 - 2021-12-29
* Made winit/glutin an optional dependency ([#868](https://github.com/emilk/egui/pull/868)).
* Simplified `EguiGlow` interface ([#871](https://github.com/emilk/egui/pull/871)).
* Removed `EguiGlow::is_quit_event` ([#881](https://github.com/emilk/egui/pull/881)).
* Updated `glutin` to 0.28 ([#930](https://github.com/emilk/egui/pull/930)). * Updated `glutin` to 0.28 ([#930](https://github.com/emilk/egui/pull/930)).
* Changed the `Painter` inteface slightly ([#999](https://github.com/emilk/egui/pull/999)). * Changed the `Painter` interface slightly ([#999](https://github.com/emilk/egui/pull/999)).
## 0.15.0 - 2021-10-24 ## 0.15.0 - 2021-10-24

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui_glow" name = "egui_glow"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui natively using the glow library" description = "Bindings for using egui natively using the glow library"
edition = "2021" edition = "2021"
@ -23,14 +23,14 @@ include = [
all-features = true all-features = true
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] } egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
epi = { version = "0.15.0", path = "../epi", optional = true } epi = { version = "0.16.0", path = "../epi", optional = true }
glow = "0.11" glow = "0.11"
memoffset = "0.6" memoffset = "0.6"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false, features = ["epi"], optional = true } egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false, features = ["epi"], optional = true }
glutin = { version = "0.28.0", optional = true } glutin = { version = "0.28.0", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]

View file

@ -4,8 +4,11 @@ All notable changes to the `egui_web` integration will be noted in this file.
## Unreleased ## Unreleased
* Fix [dark rendering in WebKitGTK](https://github.com/emilk/egui/issues/794) ([#888](https://github.com/emilk/egui/pull/888/)).
* Add feature `glow` to switch to a [`glow`](https://github.com/grovesNL/glow) based painter ([#868](https://github.com/emilk/egui/pull/868)).
## 0.16.0 - 2021-12-29
* Fixed [dark rendering in WebKitGTK](https://github.com/emilk/egui/issues/794) ([#888](https://github.com/emilk/egui/pull/888/)).
* Added feature `glow` to switch to a [`glow`](https://github.com/grovesNL/glow) based painter ([#868](https://github.com/emilk/egui/pull/868)).
## 0.15.0 - 2021-10-24 ## 0.15.0 - 2021-10-24

View file

@ -1,6 +1,6 @@
[package] [package]
name = "egui_web" name = "egui_web"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for compiling egui code to WASM for a web page" description = "Bindings for compiling egui code to WASM for a web page"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -26,11 +26,11 @@ all-features = true
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = [ egui = { version = "0.16.0", path = "../egui", default-features = false, features = [
"single_threaded", "single_threaded",
] } ] }
egui_glow = { version = "0.15.0",path = "../egui_glow", default-features = false, optional = true } egui_glow = { version = "0.16.0",path = "../egui_glow", default-features = false, optional = true }
epi = { version = "0.15.0", path = "../epi" } epi = { version = "0.16.0", path = "../epi" }
js-sys = "0.3" js-sys = "0.3"
ron = { version = "0.7", optional = true } ron = { version = "0.7", optional = true }
serde = { version = "1", optional = true } serde = { version = "1", optional = true }

View file

@ -1,6 +1,6 @@
[package] [package]
name = "emath" name = "emath"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Minimal 2D math library for GUI work" description = "Minimal 2D math library for GUI work"
edition = "2021" edition = "2021"

View file

@ -4,9 +4,12 @@ All notable changes to the epaint crate will be documented in this file.
## Unreleased ## Unreleased
* `Rgba` now implements `Hash` ([#886](https://github.com/emilk/egui/pull/886)).
## 0.16.0 - 2021-12-29
* Anti-alias path ends ([#893](https://github.com/emilk/egui/pull/893)). * Anti-alias path ends ([#893](https://github.com/emilk/egui/pull/893)).
* Rename `Texture` to `FontImage`. * `Rgba` now implements `Hash` ([#886](https://github.com/emilk/egui/pull/886)).
* Renamed `Texture` to `FontImage`.
## 0.15.0 - 2021-10-24 ## 0.15.0 - 2021-10-24

View file

@ -1,6 +1,6 @@
[package] [package]
name = "epaint" name = "epaint"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Minimal 2D graphics library for GUI work" description = "Minimal 2D graphics library for GUI work"
edition = "2021" edition = "2021"
@ -26,7 +26,7 @@ all-features = true
[lib] [lib]
[dependencies] [dependencies]
emath = { version = "0.15.0", path = "../emath" } emath = { version = "0.16.0", path = "../emath" }
ab_glyph = "0.2.11" ab_glyph = "0.2.11"
ahash = { version = "0.7", features = ["std"], default-features = false } ahash = { version = "0.7", features = ["std"], default-features = false }

View file

@ -1,6 +1,6 @@
[package] [package]
name = "epi" name = "epi"
version = "0.15.0" version = "0.16.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Backend-agnostic interface for writing apps using egui" description = "Backend-agnostic interface for writing apps using egui"
edition = "2021" edition = "2021"
@ -24,7 +24,7 @@ all-features = true
[lib] [lib]
[dependencies] [dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] } egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
directories-next = { version = "2", optional = true } directories-next = { version = "2", optional = true }
ron = { version = "0.7", optional = true } ron = { version = "0.7", optional = true }

View file

@ -50,9 +50,12 @@ cargo build \
--no-default-features \ --no-default-features \
--features ${FEATURES} --features ${FEATURES}
# Get the output directory (in the workspace it is in another location)
TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory`
echo "Generating JS bindings for wasm…" echo "Generating JS bindings for wasm…"
TARGET_NAME="${CRATE_NAME}.wasm" TARGET_NAME="${CRATE_NAME}.wasm"
wasm-bindgen "target/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \ wasm-bindgen "${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \
--out-dir docs --no-modules --no-typescript --out-dir docs --no-modules --no-typescript
# to get wasm-strip: apt/brew/dnf install wabt # to get wasm-strip: apt/brew/dnf install wabt