Skip to content

Commit

Permalink
Release 0.16.0 - Context menus and rich text
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 29, 2021
1 parent 77869c2 commit 0146c7e
Show file tree
Hide file tree
Showing 21 changed files with 115 additions and 84 deletions.
47 changes: 27 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,56 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w

## Unreleased


## 0.16.0 - 2021-12-29 - Context menus and rich text

### 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)).
* 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
bounds) while adding items. `Plot` ([#766](https://github.com/emilk/egui/pull/766) and
[#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)).
* 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)).
* Add `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 vertical sliders with `Slider::new(…).vertical()` ([#875](https://github.com/emilk/egui/pull/875)).
* Added `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)).
* 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 🔧
* 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)).
* 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))
* 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 🐛
* 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)).

### Removed 🔥
* Removed `egui::math` (use `egui::emath` instead).
* Removed `egui::paint` (use `egui::epaint` instead).

### Contributors 🙏
* [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)).
* [Bromeon](https://github.com/Bromeon): ([#863](https://github.com/emilk/egui/pull/863)).
* [d10sfan](https://github.com/d10sfan) ([#832](https://github.com/emilk/egui/pull/832)).
* [EmbersArc](https://github.com/EmbersArc): ([#766](https://github.com/emilk/egui/pull/766), [#892](https://github.com/emilk/egui/pull/892)).
* [Hperigo](https://github.com/Hperigo): ([#905](https://github.com/emilk/egui/pull/905)).
* [mankinskin](https://github.com/mankinskin) ([#543](https://github.com/emilk/egui/pull/543)).
* [niladic](https://github.com/niladic): ([#499](https://github.com/emilk/egui/pull/499), [#863](https://github.com/emilk/egui/pull/863)).
* [sumibi-yakitori](https://github.com/sumibi-yakitori) ([#830](https://github.com/emilk/egui/pull/830)).
* [t18b219k](https://github.com/t18b219k): ([#868](https://github.com/emilk/egui/pull/868), [#888](https://github.com/emilk/egui/pull/888)).
* [5225225](https://github.com/5225225): [#849](https://github.com/emilk/egui/pull/849).
* [aevyrie](https://github.com/aevyrie): [#966](https://github.com/emilk/egui/pull/966).
* [B-Reif](https://github.com/B-Reif): [#875](https://github.com/emilk/egui/pull/875).
* [Bromeon](https://github.com/Bromeon): [#863](https://github.com/emilk/egui/pull/863), [#918](https://github.com/emilk/egui/pull/918).
* [d10sfan](https://github.com/d10sfan): [#832](https://github.com/emilk/egui/pull/832).
* [EmbersArc](https://github.com/EmbersArc): [#766](https://github.com/emilk/egui/pull/766), [#892](https://github.com/emilk/egui/pull/892).
* [Hperigo](https://github.com/Hperigo): [#905](https://github.com/emilk/egui/pull/905).
* [isegal](https://github.com/isegal): [#934](https://github.com/emilk/egui/pull/934).
* [mankinskin](https://github.com/mankinskin): [#543](https://github.com/emilk/egui/pull/543).
* [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
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions eframe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ NOTE: [`egui_web`](egui_web/CHANGELOG.md), [`egui-winit`](egui-winit/CHANGELOG.m


## 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)).
* 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)).
Expand Down
14 changes: 7 additions & 7 deletions eframe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eframe"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
description = "egui framework - write GUI apps that compiles to web and/or natively"
edition = "2021"
Expand All @@ -24,18 +24,18 @@ all-features = true
[lib]

[dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false }
epi = { version = "0.15.0", path = "../epi" }
egui = { version = "0.16.0", path = "../egui", default-features = false }
epi = { version = "0.16.0", path = "../epi" }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.15.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_glow = { version = "0.15.0", path = "../egui_glow", default-features = false, features = ["clipboard", "epi", "links", "winit"], optional = true }
egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false }
egui_glium = { version = "0.16.0", path = "../egui_glium", default-features = false, features = ["clipboard", "epi", "links"], optional = true }
egui_glow = { version = "0.16.0", path = "../egui_glow", default-features = false, features = ["clipboard", "epi", "links", "winit"], optional = true }

# web:
[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]
image = { version = "0.23", default-features = false, features = ["png"] }
Expand Down
9 changes: 6 additions & 3 deletions egui-winit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ All notable changes to the `egui-winit` integration will be noted in this file.


## 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)).


Expand Down
6 changes: 3 additions & 3 deletions egui-winit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui-winit"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
description = "Bindings for using egui with winit"
edition = "2021"
Expand All @@ -22,10 +22,10 @@ include = [
all-features = true

[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"

epi = { version = "0.15.0", path = "../epi", optional = true }
epi = { version = "0.16.0", path = "../epi", optional = true }

copypasta = { version = "0.7", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions egui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
description = "Simple, portable immediate mode GUI library for Rust"
edition = "2021"
Expand All @@ -24,7 +24,7 @@ all-features = true
[lib]

[dependencies]
epaint = { version = "0.15.0", path = "../epaint", default-features = false }
epaint = { version = "0.16.0", path = "../epaint", default-features = false }

ahash = "0.7"
nohash-hasher = "0.2"
Expand Down
7 changes: 5 additions & 2 deletions egui/src/widgets/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn background_checkers(painter: &Painter, rect: Rect) {
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 {
show_hsva(ui, color.into(), desired_size)
}
Expand Down Expand Up @@ -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.
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
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);
color_cache_set(ui.ctx(), *srgba, hsva);
response
changed
}

pub fn color_edit_button_hsva(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> Response {
Expand Down
8 changes: 4 additions & 4 deletions egui_demo_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui_demo_app"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2021"
Expand All @@ -11,10 +11,10 @@ publish = false
crate-type = ["cdylib", "rlib"]

[dependencies]
eframe = { version = "0.15.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" }
# 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]
default = ["persistence"]
Expand Down
6 changes: 3 additions & 3 deletions egui_demo_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui_demo_lib"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
description = "Example library for egui"
edition = "2021"
Expand All @@ -24,8 +24,8 @@ all-features = true
[lib]

[dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false }
epi = { version = "0.15.0", path = "../epi" }
egui = { version = "0.16.0", path = "../egui", default-features = false }
epi = { version = "0.16.0", path = "../epi" }

chrono = { version = "0.4", features = ["js-sys", "wasmbind"], optional = true }
enum-map = { version = "1", features = ["serde"] }
Expand Down
9 changes: 6 additions & 3 deletions egui_glium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ All notable changes to the `egui_glium` integration will be noted in this file.


## 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)).
* 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
Expand Down
8 changes: 4 additions & 4 deletions egui_glium/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui_glium"
version = "0.15.0"
version = "0.16.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
description = "Bindings for using egui natively using the glium library"
edition = "2021"
Expand All @@ -23,9 +23,9 @@ include = [
all-features = true

[dependencies]
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] }
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false, features = ["epi"] }
epi = { version = "0.15.0", path = "../epi", optional = true }
egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false, features = ["epi"] }
epi = { version = "0.16.0", path = "../epi", optional = true }

glium = "0.31"

Expand Down
11 changes: 7 additions & 4 deletions egui_glow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ All notable changes to the `egui_glow` integration will be noted in this file.


## 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)).
* 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
Expand Down
Loading

0 comments on commit 0146c7e

Please sign in to comment.