Browse Source

Add more source code links to demos (#1260)

pull/1263/head
Urho Laukkarinen 3 years ago
committed by GitHub
parent
commit
6abdde0334
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      egui_demo_lib/src/apps/demo/code_example.rs
  2. 3
      egui_demo_lib/src/apps/demo/context_menu.rs
  3. 4
      egui_demo_lib/src/apps/demo/font_book.rs
  4. 6
      egui_demo_lib/src/apps/demo/paint_bezier.rs

4
egui_demo_lib/src/apps/demo/code_example.rs

@ -83,6 +83,10 @@ impl super::View for CodeExample {
fn ui(&mut self, ui: &mut egui::Ui) {
use crate::syntax_highlighting::code_view_ui;
ui.vertical_centered(|ui| {
ui.add(crate::__egui_github_link_file!());
});
code_view_ui(
ui,
r"

3
egui_demo_lib/src/apps/demo/context_menu.rs

@ -105,6 +105,9 @@ impl super::View for ContextMenus {
});
});
});
ui.vertical_centered(|ui| {
ui.add(crate::__egui_github_link_file!());
});
}
}

4
egui_demo_lib/src/apps/demo/font_book.rs

@ -31,6 +31,10 @@ impl super::Demo for FontBook {
impl super::View for FontBook {
fn ui(&mut self, ui: &mut egui::Ui) {
ui.vertical_centered(|ui| {
ui.add(crate::__egui_github_link_file!());
});
ui.label(format!(
"The selected font supports {} characters.",
self.named_chars

6
egui_demo_lib/src/apps/demo/paint_bezier.rs

@ -242,9 +242,9 @@ impl super::Demo for PaintBezier {
impl super::View for PaintBezier {
fn ui(&mut self, ui: &mut Ui) {
// ui.vertical_centered(|ui| {
// ui.add(crate::__egui_github_link_file!());
// });
ui.vertical_centered(|ui| {
ui.add(crate::__egui_github_link_file!());
});
self.ui_control(ui);
Frame::dark_canvas(ui.style()).show(ui, |ui| {

Loading…
Cancel
Save