Skip to content

Commit

Permalink
Remove colons from widget gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 28, 2024
1 parent fa95351 commit 2356ae8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/egui_demo_lib/src/demo/code_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/egui_demo_lib/src/demo/widget_gallery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _;
Expand Down Expand Up @@ -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(
Expand All @@ -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);
Expand Down

0 comments on commit 2356ae8

Please sign in to comment.