Add more source code links to demos (#1260)
This commit is contained in:
parent
3d754e3a16
commit
6abdde0334
4 changed files with 14 additions and 3 deletions
|
@ -83,6 +83,10 @@ impl super::View for CodeExample {
|
||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
use crate::syntax_highlighting::code_view_ui;
|
use crate::syntax_highlighting::code_view_ui;
|
||||||
|
|
||||||
|
ui.vertical_centered(|ui| {
|
||||||
|
ui.add(crate::__egui_github_link_file!());
|
||||||
|
});
|
||||||
|
|
||||||
code_view_ui(
|
code_view_ui(
|
||||||
ui,
|
ui,
|
||||||
r"
|
r"
|
||||||
|
|
|
@ -105,6 +105,9 @@ impl super::View for ContextMenus {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
ui.vertical_centered(|ui| {
|
||||||
|
ui.add(crate::__egui_github_link_file!());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,10 @@ impl super::Demo for FontBook {
|
||||||
|
|
||||||
impl super::View for FontBook {
|
impl super::View for FontBook {
|
||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
|
ui.vertical_centered(|ui| {
|
||||||
|
ui.add(crate::__egui_github_link_file!());
|
||||||
|
});
|
||||||
|
|
||||||
ui.label(format!(
|
ui.label(format!(
|
||||||
"The selected font supports {} characters.",
|
"The selected font supports {} characters.",
|
||||||
self.named_chars
|
self.named_chars
|
||||||
|
|
|
@ -242,9 +242,9 @@ impl super::Demo for PaintBezier {
|
||||||
|
|
||||||
impl super::View for PaintBezier {
|
impl super::View for PaintBezier {
|
||||||
fn ui(&mut self, ui: &mut Ui) {
|
fn ui(&mut self, ui: &mut Ui) {
|
||||||
// ui.vertical_centered(|ui| {
|
ui.vertical_centered(|ui| {
|
||||||
// ui.add(crate::__egui_github_link_file!());
|
ui.add(crate::__egui_github_link_file!());
|
||||||
// });
|
});
|
||||||
self.ui_control(ui);
|
self.ui_control(ui);
|
||||||
|
|
||||||
Frame::dark_canvas(ui.style()).show(ui, |ui| {
|
Frame::dark_canvas(ui.style()).show(ui, |ui| {
|
||||||
|
|
Loading…
Reference in a new issue