Skip to content

Commit

Permalink
Add missing links to source code (#3770)
Browse files Browse the repository at this point in the history
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Closes <https://github.com/emilk/egui/issues/THE_RELEVANT_ISSUE>.
  • Loading branch information
c-git committed Jan 8, 2024
1 parent 937c09f commit b0c7a7f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/egui_demo_lib/src/demo/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ impl super::View for About {
ui.hyperlink_to("Rerun.io", "https://www.rerun.io/");
ui.label(", a startup building an SDK for visualizing streams of multimodal data");
});

ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});
}
}

Expand Down
4 changes: 4 additions & 0 deletions crates/egui_demo_lib/src/demo/highlighting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ impl super::Demo for Highlighting {

impl super::View for Highlighting {
fn ui(&mut self, ui: &mut egui::Ui) {
ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});

ui.label("This demo demonstrates highlighting a widget.");
ui.add_space(4.0);
let label_response = ui.label("Hover me to highlight the button!");
Expand Down
4 changes: 4 additions & 0 deletions crates/egui_demo_lib/src/demo/layout_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ impl super::View for LayoutTest {
}
});
ui.label("Resize to see effect");

ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});
}
}

Expand Down
3 changes: 3 additions & 0 deletions crates/egui_demo_lib/src/demo/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ impl super::Demo for WindowResizeTest {
.default_size([250.0, 150.0])
.show(ctx, |ui| {
ui.label("This window has empty space that fills up the available space, preventing auto-shrink.");
ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});
ui.allocate_space(ui.available_size());
});
}
Expand Down
4 changes: 4 additions & 0 deletions crates/egui_demo_lib/src/demo/text_edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ impl super::Demo for TextEditDemo {

impl super::View for TextEditDemo {
fn ui(&mut self, ui: &mut egui::Ui) {
ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});

let Self { text } = self;

ui.horizontal(|ui| {
Expand Down
3 changes: 3 additions & 0 deletions crates/egui_demo_lib/src/demo/window_with_panels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ impl super::View for WindowWithPanels {
ui.vertical_centered(|ui| {
ui.heading("Bottom Panel");
});
ui.vertical_centered(|ui| {
ui.add(crate::egui_github_link_file!());
});
});

egui::CentralPanel::default().show_inside(ui, |ui| {
Expand Down

0 comments on commit b0c7a7f

Please sign in to comment.