Remove colons from widget gallery
This commit is contained in:
parent
fa95351675
commit
2356ae8819
|
|
@ -111,7 +111,7 @@ impl crate::Demo for CodeExample {
|
||||||
.min_width(375.0)
|
.min_width(375.0)
|
||||||
.default_size([390.0, 500.0])
|
.default_size([390.0, 500.0])
|
||||||
.scroll(false)
|
.scroll(false)
|
||||||
.resizable([true, false])
|
.resizable([true, false]) // resizable so we can shrink if the text edit grows
|
||||||
.show(ctx, |ui| self.ui(ui));
|
.show(ctx, |ui| self.ui(ui));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ impl crate::Demo for WidgetGallery {
|
||||||
fn show(&mut self, ctx: &egui::Context, open: &mut bool) {
|
fn show(&mut self, ctx: &egui::Context, open: &mut bool) {
|
||||||
egui::Window::new(self.name())
|
egui::Window::new(self.name())
|
||||||
.open(open)
|
.open(open)
|
||||||
.resizable([true, false])
|
.resizable([true, false]) // resizable so we can shrink if the text edit grows
|
||||||
.default_width(280.0)
|
.default_width(280.0)
|
||||||
.show(ctx, |ui| {
|
.show(ctx, |ui| {
|
||||||
use crate::View as _;
|
use crate::View as _;
|
||||||
|
|
@ -254,7 +254,7 @@ impl WidgetGallery {
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.hyperlink_to(
|
ui.hyperlink_to(
|
||||||
"Custom widget:",
|
"Custom widget",
|
||||||
super::toggle_switch::url_to_file_source_code(),
|
super::toggle_switch::url_to_file_source_code(),
|
||||||
);
|
);
|
||||||
ui.add(super::toggle_switch::toggle(boolean)).on_hover_text(
|
ui.add(super::toggle_switch::toggle(boolean)).on_hover_text(
|
||||||
|
|
@ -274,10 +274,9 @@ fn doc_link_label_with_crate<'a>(
|
||||||
title: &'a str,
|
title: &'a str,
|
||||||
search_term: &'a str,
|
search_term: &'a str,
|
||||||
) -> impl egui::Widget + 'a {
|
) -> impl egui::Widget + 'a {
|
||||||
let label = format!("{title}:");
|
|
||||||
let url = format!("https://docs.rs/{crate_name}?search={search_term}");
|
let url = format!("https://docs.rs/{crate_name}?search={search_term}");
|
||||||
move |ui: &mut egui::Ui| {
|
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.horizontal_wrapped(|ui| {
|
||||||
ui.label("Search egui docs for");
|
ui.label("Search egui docs for");
|
||||||
ui.code(search_term);
|
ui.code(search_term);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue