From 268ddca161644309c307057de8c2012e0c320cf8 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 8 May 2021 16:27:05 +0200 Subject: [PATCH] demo_app: Remove screen_reader from default features closes https://github.com/emilk/egui/issues/338 --- egui_demo_app/Cargo.toml | 2 +- egui_demo_lib/src/apps/demo/widgets.rs | 11 +++++++++++ egui_glium/examples/pure.rs | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/egui_demo_app/Cargo.toml b/egui_demo_app/Cargo.toml index 0f6fcc92adf..2aa50d3ebae 100644 --- a/egui_demo_app/Cargo.toml +++ b/egui_demo_app/Cargo.toml @@ -14,7 +14,7 @@ eframe = { version = "0.11.0", path = "../eframe", features = ["time"] } egui_demo_lib = { version = "0.11.0", path = "../egui_demo_lib" } [features] -default = ["persistence", "screen_reader"] +default = ["persistence"] http = ["eframe/http", "egui_demo_lib/http"] persistence = ["eframe/persistence", "egui_demo_lib/persistence"] screen_reader = ["eframe/screen_reader"] # experimental diff --git a/egui_demo_lib/src/apps/demo/widgets.rs b/egui_demo_lib/src/apps/demo/widgets.rs index c4437e25455..723ae7cd496 100644 --- a/egui_demo_lib/src/apps/demo/widgets.rs +++ b/egui_demo_lib/src/apps/demo/widgets.rs @@ -55,6 +55,17 @@ impl Widgets { ui.add(crate::__egui_github_link_file_line!()); }); + egui::ComboBox::from_label("Version") + .width(150.0) + .selected_text("foo") + .show_ui(ui, |ui| { + egui::CollapsingHeader::new("Dev") + .default_open(true) + .show(ui, |ui| { + ui.label("contents"); + }); + }); + ui.horizontal_wrapped(|ui| { // Trick so we don't have to add spaces in the text below: ui.spacing_mut().item_spacing.x = ui.fonts()[TextStyle::Body].glyph_width(' '); diff --git a/egui_glium/examples/pure.rs b/egui_glium/examples/pure.rs index 885f9a7aa22..2b05247a8ba 100644 --- a/egui_glium/examples/pure.rs +++ b/egui_glium/examples/pure.rs @@ -36,6 +36,17 @@ fn main() { if ui.button("Quit").clicked() { quit = true; } + + egui::ComboBox::from_label("Version") + .width(150.0) + .selected_text("foo") + .show_ui(ui, |ui| { + egui::CollapsingHeader::new("Dev") + .default_open(true) + .show(ui, |ui| { + ui.label("contents"); + }); + }); }); let (needs_repaint, shapes) = egui.end_frame(&display);