From 2356ae8819e65d78f1ddf4e2fb97c70b05d32a53 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 28 Dec 2024 23:26:26 +0100 Subject: [PATCH] Remove colons from widget gallery --- crates/egui_demo_lib/src/demo/code_example.rs | 2 +- crates/egui_demo_lib/src/demo/widget_gallery.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/egui_demo_lib/src/demo/code_example.rs b/crates/egui_demo_lib/src/demo/code_example.rs index d6c8a7dfbd5..9094c19a71d 100644 --- a/crates/egui_demo_lib/src/demo/code_example.rs +++ b/crates/egui_demo_lib/src/demo/code_example.rs @@ -111,7 +111,7 @@ impl crate::Demo for CodeExample { .min_width(375.0) .default_size([390.0, 500.0]) .scroll(false) - .resizable([true, false]) + .resizable([true, false]) // resizable so we can shrink if the text edit grows .show(ctx, |ui| self.ui(ui)); } } diff --git a/crates/egui_demo_lib/src/demo/widget_gallery.rs b/crates/egui_demo_lib/src/demo/widget_gallery.rs index b69d0f1c8d2..d473d4b9d0e 100644 --- a/crates/egui_demo_lib/src/demo/widget_gallery.rs +++ b/crates/egui_demo_lib/src/demo/widget_gallery.rs @@ -50,7 +50,7 @@ impl crate::Demo for WidgetGallery { fn show(&mut self, ctx: &egui::Context, open: &mut bool) { egui::Window::new(self.name()) .open(open) - .resizable([true, false]) + .resizable([true, false]) // resizable so we can shrink if the text edit grows .default_width(280.0) .show(ctx, |ui| { use crate::View as _; @@ -254,7 +254,7 @@ impl WidgetGallery { ui.end_row(); ui.hyperlink_to( - "Custom widget:", + "Custom widget", super::toggle_switch::url_to_file_source_code(), ); ui.add(super::toggle_switch::toggle(boolean)).on_hover_text( @@ -274,10 +274,9 @@ fn doc_link_label_with_crate<'a>( title: &'a str, search_term: &'a str, ) -> impl egui::Widget + 'a { - let label = format!("{title}:"); let url = format!("https://docs.rs/{crate_name}?search={search_term}"); move |ui: &mut egui::Ui| { - ui.hyperlink_to(label, url).on_hover_ui(|ui| { + ui.hyperlink_to(title, url).on_hover_ui(|ui| { ui.horizontal_wrapped(|ui| { ui.label("Search egui docs for"); ui.code(search_term);