1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Roll out new egui icon and logo (#7995)

For the first time _ever_, egui has a logo!

<img width="3925" height="1406" alt="egui-logo"
src="https://github.com/user-attachments/assets/cfaf1d43-9338-490f-ae82-99b420baa1b0"
/>

Made by [Studio Gruhl](https://www.studiogruhl.com/) and paid for by
[Rerun.io](https://rerun.io/).
This commit is contained in:
Emil Ernerfeldt
2026-03-21 22:47:15 +01:00
committed by GitHub
parent 1b2a065342
commit 49fad9a7b2
34 changed files with 129 additions and 102 deletions

View File

@@ -27,20 +27,30 @@ impl crate::View for About {
fn ui(&mut self, ui: &mut egui::Ui) {
use egui::special_emojis::{OS_APPLE, OS_LINUX, OS_WINDOWS};
ui.heading("egui");
ui.vertical_centered(|ui| {
ui.add_space(4.0);
let egui_icon = egui::include_image!("../../data/egui-logo.svg");
ui.add(
egui::Image::new(egui_icon.clone())
.max_height(30.0)
.tint(ui.visuals().strong_text_color()),
);
ui.add_space(4.0);
});
ui.label(format!(
"egui is an immediate mode GUI library written in Rust. egui runs both on the web and natively on {}{}{}. \
On the web it is compiled to WebAssembly and rendered with WebGL.{}",
"egui is an immediate mode GUI library written in Rust. egui runs natively on {}{}{}, and \
on the web it is compiled to WebAssembly and rendered with WebGL or WebGPU.{}",
OS_APPLE, OS_LINUX, OS_WINDOWS,
if cfg!(target_arch = "wasm32") {
" Everything you see is rendered as textured triangles. There is no DOM, HTML, JS or CSS. Just Rust."
} else {""}
));
ui.label("egui is designed to be easy to use, portable, and fast.");
ui.add_space(12.0);
ui.label("egui is easy to use, portable, and fast.");
ui.heading("Immediate mode");
ui.add_space(12.0);
about_immediate_mode(ui);
ui.add_space(12.0);
@@ -52,12 +62,12 @@ impl crate::View for About {
ui.horizontal_wrapped(|ui| {
ui.spacing_mut().item_spacing.x = 0.0;
ui.label("egui development is sponsored by ");
ui.weak("egui development is sponsored by ");
ui.hyperlink_to("Rerun.io", "https://www.rerun.io/");
ui.label(", a startup building an SDK for visualizing streams of multimodal data. ");
ui.label("For an example of a real-world egui app, see ");
ui.weak(", a startup building a data platform for robotics. ");
ui.weak("For an example of a professional egui app, run ");
ui.hyperlink_to("rerun.io/viewer", "https://www.rerun.io/viewer");
ui.label(" (runs in your browser).");
ui.weak(" (in your browser!).");
});
ui.add_space(12.0);
@@ -72,11 +82,9 @@ fn about_immediate_mode(ui: &mut egui::Ui) {
ui.style_mut().spacing.interact_size.y = 0.0; // hack to make `horizontal_wrapped` work better with text.
ui.horizontal_wrapped(|ui| {
ui.spacing_mut().item_spacing.x = 0.0;
ui.label("Immediate mode is a GUI paradigm that lets you create a GUI with less code and simpler control flow. For example, this is how you create a ");
let _ = ui.small_button("button");
ui.label(" in egui:");
});
ui.spacing_mut().item_spacing.x = 0.0;
ui.label("This is how you create a button in egui:");
});
ui.add_space(8.0);
crate::rust_view_ui(

View File

@@ -119,21 +119,30 @@ impl Default for DemoGroups {
}
impl DemoGroups {
pub fn about_egui_checkbox(&mut self, ui: &mut Ui, open: &mut BTreeSet<String>) {
let Self { about, .. } = self;
let mut is_open = open.contains(about.name());
ui.toggle_value(&mut is_open, about.name());
set_open(open, about.name(), is_open);
}
pub fn checkboxes(&mut self, ui: &mut Ui, open: &mut BTreeSet<String>) {
let Self {
about,
about: _,
demos,
tests,
} = self;
{
let mut is_open = open.contains(about.name());
ui.toggle_value(&mut is_open, about.name());
set_open(open, about.name(), is_open);
}
ui.separator();
ui.vertical_centered(|ui| {
ui.strong("Demos");
});
demos.checkboxes(ui, open);
ui.separator();
ui.vertical_centered(|ui| {
ui.strong("Tests");
});
tests.checkboxes(ui, open);
}
@@ -267,22 +276,20 @@ impl DemoWindows {
.default_size(160.0)
.min_size(160.0)
.show_inside(ui, |ui| {
ui.add_space(4.0);
ui.vertical_centered(|ui| {
ui.heading("✒ egui demos");
ui.vertical_centered_justified(|ui| {
ui.add_space(4.0);
ui.add(
egui::Image::new(egui::include_image!("../../data/egui-logo.svg"))
.max_height(32.0)
.tint(ui.visuals().strong_text_color()),
);
ui.add_space(4.0);
self.groups.about_egui_checkbox(ui, &mut self.open);
});
ui.separator();
use egui::special_emojis::GITHUB;
ui.hyperlink_to(
format!("{GITHUB} egui on GitHub"),
"https://github.com/emilk/egui",
);
ui.hyperlink_to(
"@ernerfeldt.bsky.social",
"https://bsky.app/profile/ernerfeldt.bsky.social",
);
ui.add_space(4.0);
ui.separator();

View File

@@ -30,7 +30,7 @@ impl crate::View for SvgTest {
fn ui(&mut self, ui: &mut egui::Ui) {
let Self { color } = self;
ui.color_edit_button_srgba(color);
let img_src = egui::include_image!("../../../data/peace.svg");
let img_src = egui::include_image!("../../../data/icon.svg");
// First paint a small version, sized the same as the source…
ui.add(

View File

@@ -229,7 +229,7 @@ impl WidgetGallery {
ui.end_row();
ui.add(doc_link_label("Image", "Image"));
let egui_icon = egui::include_image!("../../data/icon.png");
let egui_icon = egui::include_image!("../../data/icon.svg");
ui.add(egui::Image::new(egui_icon.clone()));
ui.end_row();
@@ -237,10 +237,7 @@ impl WidgetGallery {
"Button with image",
"Button::image_and_text",
));
if ui
.add(egui::Button::image_and_text(egui_icon, "Click me!"))
.clicked()
{
if ui.button((egui_icon, "Click me!")).clicked() {
*boolean = !*boolean;
}
ui.end_row();