Skip to content

Commit

Permalink
Example improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Sep 2, 2024
1 parent 1b4fceb commit 51266e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/egui_demo_lib/src/demo/demo_app_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ impl DemoWindows {
fn desktop_ui(&mut self, ctx: &Context) {
egui::SidePanel::right("egui_demo_panel")
.resizable(false)
.default_width(150.0)
.default_width(160.0)
.min_width(160.0)
.show(ctx, |ui| {
ui.add_space(4.0);
ui.vertical_centered(|ui| {
Expand Down
8 changes: 7 additions & 1 deletion crates/egui_demo_lib/src/demo/interactive_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ impl crate::Demo for InteractiveContainerDemo {
egui::Window::new(self.name())
.open(open)
.resizable(false)
.default_width(250.0)
.show(ctx, |ui| {
use crate::View as _;
self.ui(ui);
Expand All @@ -30,7 +31,12 @@ impl crate::View for InteractiveContainerDemo {
ui.add(crate::egui_github_link_file!());
});

ui.label("This demo showcases how to use Ui::read_response to create interactive container widgets that may contain other widgets.");
ui.horizontal_wrapped(|ui| {
ui.spacing_mut().item_spacing.x = 0.0;
ui.label("This demo showcases how to use ");
ui.code("Ui::read_response");
ui.label(" to create interactive container widgets that may contain other widgets.");
});

let response = ui
.scope_builder(
Expand Down

0 comments on commit 51266e9

Please sign in to comment.