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/).
10
README.md
@@ -10,16 +10,14 @@
|
|||||||
[](https://discord.gg/JFcEma9bJq)
|
[](https://discord.gg/JFcEma9bJq)
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://www.rerun.io/"><img src="https://github.com/user-attachments/assets/78e79463-4357-461b-bbd1-31aa5ef5e1a2" width="250"></a>
|
<a href="https://www.egui.rs/"><img src="https://github.com/user-attachments/assets/cfaf1d43-9338-490f-ae82-99b420baa1b0" width="400"></a>
|
||||||
|
|
||||||
egui development is sponsored by [Rerun](https://www.rerun.io/), a startup building<br>
|
<br/>
|
||||||
an SDK for visualizing streams of multimodal data.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
👉 [Click to run the web demo](https://www.egui.rs/#demo) 👈
|
👉 [Click to run the web demo](https://www.egui.rs/#demo) 👈
|
||||||
|
</div>
|
||||||
|
|
||||||
egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and [in your favorite game engine](#integrations).
|
egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and [in your favorite game engine](#integrations).
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 12 KiB |
@@ -400,6 +400,8 @@ impl WrapApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn bar_contents(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame, cmd: &mut Command) {
|
fn bar_contents(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame, cmd: &mut Command) {
|
||||||
|
ui.add_space(8.0);
|
||||||
|
|
||||||
egui::widgets::global_theme_preference_switch(ui);
|
egui::widgets::global_theme_preference_switch(ui);
|
||||||
|
|
||||||
ui.separator();
|
ui.separator();
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e4cff85a005ad897624f6c7a2b2ad599325ec99e0b3c9c35963f16611f283997
|
oid sha256:63021012cccfca02d09aa424333453140ae4da3ae58fa32b422f6152ba25741c
|
||||||
size 335371
|
size 335394
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cc55083688d043234c37d22c74635a44b00f4d28c3802c4327c2eaf563c73eed
|
oid sha256:4470063fe210d2e5170d6609c2603fff1984b8ee76fb65a1f60a1c4cfdf46ce8
|
||||||
size 92800
|
size 92796
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:78d91fa4657cd1cb375487f606b80d418ed6fdbd8a0c0225b9383eead5001563
|
oid sha256:b9ad01a55950f96a3ae9e48a2c026143d11ffee62bff4f83b4529cd884ce11f0
|
||||||
size 169682
|
size 169683
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:73592be3cb5e2bbc1de870050b913b307e31c05df339b2fd78e9ce38c05f4cd2
|
oid sha256:6030f2f3da3dbbdf8bf3eaf429f222acffb624c7696b654d8b6e64273d49be58
|
||||||
size 96758
|
size 99008
|
||||||
|
|||||||
21
crates/egui_demo_lib/data/egui-logo.svg
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<svg width="1165" height="366" viewBox="0 0 1165 366" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_2005_93)">
|
||||||
|
<mask id="mask0_2005_93" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="334" y="0" width="831" height="366">
|
||||||
|
<path d="M1165 0H334V365.17H1165V0Z" fill="white"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_2005_93)">
|
||||||
|
<path d="M334.059 166.33C334.679 134.02 349.889 103.38 376.099 84.4502C390.759 73.8602 409.699 68.8302 427.749 68.9302C472.239 69.1802 500.199 89.0902 514.439 126.26C518.609 137.17 520.839 145.47 521.289 157.13C521.629 166.3 521.789 178.32 521.829 183.4C521.829 184.74 520.769 185.81 519.429 185.81H382.519C380.709 185.81 379.249 187.31 379.309 189.12C380.349 220.05 396.199 237.77 427.749 238.44C447.819 238.87 463.969 230.46 470.749 216.17C471.259 215.08 472.379 214.41 473.599 214.41H517.259C518.809 214.41 519.989 215.88 519.589 217.41C510.809 251.9 478.299 279.88 427.749 280.6C359.269 280.43 338.449 230.44 334.299 182.61C333.939 178.51 333.939 172.29 334.049 166.32V166.34L334.059 166.33ZM469.049 146.33C470.989 146.33 472.479 144.62 472.229 142.69C469.219 119.35 452.109 106.3 427.969 106.3C400.019 106.3 385.689 118.56 380.089 142.35C379.619 144.38 381.119 146.32 383.199 146.32H469.049V146.33Z" fill="white"/>
|
||||||
|
<path d="M685.599 75.4002V79.9202C685.599 82.3602 682.999 83.9002 680.859 82.7302C670.869 75.0802 658.989 68.9002 637.819 68.9102C591.729 68.9602 552.329 100.48 547.649 145.55C546.819 153.48 546.669 183.26 546.859 186.07C550.349 242.31 566.189 280.84 636.229 280.84C661.839 280.84 670.739 272.74 681.219 266.01C683.319 265.14 685.629 266.71 685.629 268.98V317.05C712.179 317.05 733.709 289.78 733.709 263.22V75.4002C733.709 73.6302 732.279 72.1902 730.499 72.1902H688.839C687.069 72.1902 685.629 73.6202 685.629 75.3902L685.599 75.4002ZM685.229 190.32C685.229 195.53 684.519 202.49 682.979 207.58C676.579 228.66 662.369 239.82 636.519 239.82C612.679 239.82 595.699 226.2 592.379 202.84C592.029 200.44 591.899 198.01 591.899 195.58V155.56C591.899 150.25 592.609 144.96 594.149 139.88C600.549 118.8 614.759 106.82 640.609 106.82C664.449 106.82 681.429 121.26 684.749 144.63C685.089 147.03 685.229 149.46 685.229 151.89V190.34V190.32Z" fill="white"/>
|
||||||
|
<path d="M561.44 317.09H685.63V320.3C685.63 345.09 665.54 365.17 640.76 365.17H561.44C559.67 365.17 558.23 363.73 558.23 361.96V320.3C558.23 318.53 559.67 317.09 561.44 317.09Z" fill="white"/>
|
||||||
|
<path d="M1097.7 72.1301C1099.47 72.1301 1100.92 73.5301 1100.92 75.3001C1100.92 86.6501 1100.9 205.37 1100.9 226.49C1100.9 228.26 1102.34 229.7 1104.11 229.7H1161.79C1163.56 229.7 1165 231.14 1165 232.91V274.78C1165 276.55 1163.57 277.99 1161.79 277.99H991.928C990.158 277.99 988.718 276.56 988.718 274.78V232.9C988.718 231.13 990.148 229.69 991.928 229.69H1049.61C1051.38 229.69 1052.81 228.26 1052.81 226.48L1052.78 120.18C1052.78 118.41 1051.34 116.97 1049.57 116.97H991.878C990.108 116.97 988.668 115.54 988.668 113.76V75.3101C988.668 73.5401 990.098 72.1001 991.878 72.1001H1097.7V72.1201V72.1301Z" fill="white"/>
|
||||||
|
<path d="M910.9 72.1299C909.13 72.1299 907.69 73.5699 907.69 75.3399V192.16C907.69 195.39 907.46 198.84 907.07 202.11C906.32 208.25 904.46 214.24 901.28 219.55C893.34 232.89 879.58 239.42 858.99 239.82C835.72 240.27 818.54 225.08 815.21 202.11C814.87 199.76 814.39 194.57 814.39 192.16V75.3399C814.39 73.5699 812.96 72.1299 811.18 72.1299H768.39C766.62 72.1299 765.18 73.5699 765.18 75.3399V188.89C765.18 240.58 788.39 282.7 860.25 281.02C883.37 277.82 890.5 272.68 903.44 266.05C905.56 264.96 908.09 266.52 908.09 268.91L907.97 274.61C907.97 276.38 909.41 277.82 911.18 277.82H952.89C954.66 277.82 956.1 276.38 956.1 274.61V75.3399C956.1 73.5699 954.67 72.1299 952.89 72.1299H910.9Z" fill="white"/>
|
||||||
|
<path d="M1097.66 0H1056C1054.22 0 1052.79 1.43 1052.79 3.21V44.88C1052.79 46.65 1054.22 48.09 1056 48.09H1097.66C1099.43 48.09 1100.87 46.66 1100.87 44.88V3.21C1100.87 1.44 1099.43 0 1097.66 0Z" fill="white"/>
|
||||||
|
</g>
|
||||||
|
<path d="M165.96 72C171.15 72 175.95 74.8 178.55 79.34L229.02 167.66C231.62 172.2 231.62 177.8 229.02 182.34L178.55 270.66C175.95 275.2 171.15 278 165.96 278H65.01C59.82 278 55.02 275.2 52.42 270.66L1.95 182.34C-0.65 177.8 -0.65 172.2 1.95 167.66L52.43 79.34C55.03 74.8 59.82 72 65.02 72H165.97H165.96ZM99.88 249.29C99.88 251.36 101.56 253.03 103.63 253.03H127.56C129.51 253.03 131.09 251.45 131.09 249.5V221.82C131.09 204.58 117.12 190.61 99.88 190.61V249.29ZM40.99 159.39C39.04 159.39 37.46 160.97 37.46 162.92V186.85C37.46 188.92 39.14 190.6 41.21 190.6H99.89C99.89 173.36 85.92 159.39 68.68 159.39H41H40.99ZM131.09 159.39C131.09 176.63 145.06 190.6 162.3 190.6H189.98C191.93 190.6 193.51 189.02 193.51 187.07V163.14C193.51 161.07 191.83 159.39 189.76 159.39H131.08H131.09ZM103.41 96.97C101.46 96.97 99.88 98.55 99.88 100.5V128.18C99.88 145.42 113.85 159.39 131.09 159.39V100.71C131.09 98.64 129.41 96.96 127.34 96.96H103.41V96.97Z" fill="white"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_2005_93">
|
||||||
|
<rect width="1165" height="366" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.7 KiB |
5
crates/egui_demo_lib/data/icon.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
||||||
|
<rect x="0.1" y="0.1" width="15.8" height="15.8" rx="2.75714" fill="black" data-darkreader-inline-fill="" style="--darkreader-inline-fill: var(--darkreader-background-000000, #000000);"/>
|
||||||
|
<rect x="0.1" y="0.1" width="15.8" height="15.8" rx="2.75714" stroke="white" stroke-width="0.2" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke: var(--darkreader-text-ffffff, #e8e6e3);"/>
|
||||||
|
<path d="M10.6112 2.54492C10.8843 2.54492 11.1367 2.69172 11.2733 2.93066L13.9286 7.5752C14.065 7.81401 14.0649 8.10877 13.9286 8.34766L11.2733 12.9932C11.1367 13.232 10.8843 13.3789 10.6112 13.3789H5.30162C5.02857 13.3789 4.77605 13.2321 4.63951 12.9932L1.98521 8.34766C1.8487 8.10872 1.84866 7.81412 1.98521 7.5752L4.63951 2.93066C4.77605 2.69176 5.02855 2.54497 5.30162 2.54492H10.6112ZM7.13658 11.8691C7.13674 11.9778 7.22514 12.0654 7.33384 12.0654H8.59263C8.69507 12.0652 8.77818 11.9824 8.77818 11.8799V10.4238C8.77797 9.51742 8.04301 8.78231 7.13658 8.78223V11.8691ZM4.03892 7.14062C3.93634 7.1407 3.85337 7.22456 3.85337 7.32715V8.58594C3.85355 8.6946 3.94195 8.78223 4.05064 8.78223H7.13658C7.13637 7.87582 6.40142 7.1407 5.49498 7.14062H4.03892ZM8.7772 7.14062C8.7772 8.04726 9.51217 8.78223 10.4188 8.78223H11.8749C11.9773 8.78201 12.0604 8.69918 12.0604 8.59668V7.33789C12.0604 7.22913 11.9719 7.14062 11.8631 7.14062H8.7772ZM7.32212 3.85742C7.21955 3.85749 7.13658 3.94135 7.13658 4.04395V5.49902C7.13658 6.40566 7.87154 7.14062 8.77818 7.14062V4.05469C8.77816 3.94591 8.68971 3.85742 8.58091 3.85742H7.32212Z" fill="white" data-darkreader-inline-fill="" style="--darkreader-inline-fill: var(--darkreader-background-ffffff, #181a1b);"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 44 44" width="32" height="32">
|
|
||||||
<g fill="none" stroke="white" stroke-width="3">
|
|
||||||
<circle cx="22" cy="22" r="19"/>
|
|
||||||
<path d="M 22,2 V 41"/>
|
|
||||||
<path d="M 22,2 V 22" transform="rotate(135, 22, 22)"/>
|
|
||||||
<path d="M 22,2 V 22" transform="rotate(225, 22, 22)"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 437 B |
@@ -27,20 +27,30 @@ impl crate::View for About {
|
|||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
use egui::special_emojis::{OS_APPLE, OS_LINUX, OS_WINDOWS};
|
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!(
|
ui.label(format!(
|
||||||
"egui is an immediate mode GUI library written in Rust. egui runs both on the web and natively on {}{}{}. \
|
"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.{}",
|
on the web it is compiled to WebAssembly and rendered with WebGL or WebGPU.{}",
|
||||||
OS_APPLE, OS_LINUX, OS_WINDOWS,
|
OS_APPLE, OS_LINUX, OS_WINDOWS,
|
||||||
if cfg!(target_arch = "wasm32") {
|
if cfg!(target_arch = "wasm32") {
|
||||||
" Everything you see is rendered as textured triangles. There is no DOM, HTML, JS or CSS. Just Rust."
|
" Everything you see is rendered as textured triangles. There is no DOM, HTML, JS or CSS. Just Rust."
|
||||||
} else {""}
|
} else {""}
|
||||||
));
|
));
|
||||||
ui.label("egui is designed to be easy to use, portable, and fast.");
|
|
||||||
|
|
||||||
ui.add_space(12.0);
|
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);
|
about_immediate_mode(ui);
|
||||||
|
|
||||||
ui.add_space(12.0);
|
ui.add_space(12.0);
|
||||||
@@ -52,12 +62,12 @@ impl crate::View for About {
|
|||||||
|
|
||||||
ui.horizontal_wrapped(|ui| {
|
ui.horizontal_wrapped(|ui| {
|
||||||
ui.spacing_mut().item_spacing.x = 0.0;
|
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.hyperlink_to("Rerun.io", "https://www.rerun.io/");
|
||||||
ui.label(", a startup building an SDK for visualizing streams of multimodal data. ");
|
ui.weak(", a startup building a data platform for robotics. ");
|
||||||
ui.label("For an example of a real-world egui app, see ");
|
ui.weak("For an example of a professional egui app, run ");
|
||||||
ui.hyperlink_to("rerun.io/viewer", "https://www.rerun.io/viewer");
|
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);
|
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.style_mut().spacing.interact_size.y = 0.0; // hack to make `horizontal_wrapped` work better with text.
|
||||||
|
|
||||||
ui.horizontal_wrapped(|ui| {
|
ui.horizontal_wrapped(|ui| {
|
||||||
ui.spacing_mut().item_spacing.x = 0.0;
|
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 ");
|
ui.label("This is how you create a button in egui:");
|
||||||
let _ = ui.small_button("button");
|
});
|
||||||
ui.label(" in egui:");
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.add_space(8.0);
|
ui.add_space(8.0);
|
||||||
crate::rust_view_ui(
|
crate::rust_view_ui(
|
||||||
|
|||||||
@@ -119,21 +119,30 @@ impl Default for DemoGroups {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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>) {
|
pub fn checkboxes(&mut self, ui: &mut Ui, open: &mut BTreeSet<String>) {
|
||||||
let Self {
|
let Self {
|
||||||
about,
|
about: _,
|
||||||
demos,
|
demos,
|
||||||
tests,
|
tests,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
{
|
ui.vertical_centered(|ui| {
|
||||||
let mut is_open = open.contains(about.name());
|
ui.strong("Demos");
|
||||||
ui.toggle_value(&mut is_open, about.name());
|
});
|
||||||
set_open(open, about.name(), is_open);
|
|
||||||
}
|
|
||||||
ui.separator();
|
|
||||||
demos.checkboxes(ui, open);
|
demos.checkboxes(ui, open);
|
||||||
|
|
||||||
ui.separator();
|
ui.separator();
|
||||||
|
|
||||||
|
ui.vertical_centered(|ui| {
|
||||||
|
ui.strong("Tests");
|
||||||
|
});
|
||||||
tests.checkboxes(ui, open);
|
tests.checkboxes(ui, open);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,22 +276,20 @@ impl DemoWindows {
|
|||||||
.default_size(160.0)
|
.default_size(160.0)
|
||||||
.min_size(160.0)
|
.min_size(160.0)
|
||||||
.show_inside(ui, |ui| {
|
.show_inside(ui, |ui| {
|
||||||
ui.add_space(4.0);
|
ui.vertical_centered_justified(|ui| {
|
||||||
ui.vertical_centered(|ui| {
|
ui.add_space(4.0);
|
||||||
ui.heading("✒ egui demos");
|
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();
|
ui.add_space(4.0);
|
||||||
|
|
||||||
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.separator();
|
ui.separator();
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ impl crate::View for SvgTest {
|
|||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
let Self { color } = self;
|
let Self { color } = self;
|
||||||
ui.color_edit_button_srgba(color);
|
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…
|
// First paint a small version, sized the same as the source…
|
||||||
ui.add(
|
ui.add(
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ impl WidgetGallery {
|
|||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
ui.add(doc_link_label("Image", "Image"));
|
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.add(egui::Image::new(egui_icon.clone()));
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|
||||||
@@ -237,10 +237,7 @@ impl WidgetGallery {
|
|||||||
"Button with image",
|
"Button with image",
|
||||||
"Button::image_and_text",
|
"Button::image_and_text",
|
||||||
));
|
));
|
||||||
if ui
|
if ui.button((egui_icon, "Click me!")).clicked() {
|
||||||
.add(egui::Button::image_and_text(egui_icon, "Click me!"))
|
|
||||||
.clicked()
|
|
||||||
{
|
|
||||||
*boolean = !*boolean;
|
*boolean = !*boolean;
|
||||||
}
|
}
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:dfccdafb7e96db488bb5bb8c0a7d25f70e63d900d6b1c2280d218aac0e70e4c4
|
oid sha256:24f4a9745c60c0353ece5f8fc48200671dcb185f4f0b964bbe66bf4a2fe71d7a
|
||||||
size 26977
|
size 27067
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:888ed4281c2c779b08bc1719302b9923f542026811cff8ae91e44ea1faa25783
|
oid sha256:fadea24444c402695db6cbc9e03aef8a0ed3c5db487a324fb255d38c14f73dce
|
||||||
size 25804
|
size 19804
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:4d10b78f4d80d61a3352d7f2b0ed9b2d93af5f184f2487f6f2afff02a38f4608
|
oid sha256:f6105c95470d1342f9003ab03e71243b5e18a6f225261aee94b15f8f0501572c
|
||||||
size 33475
|
size 33542
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:c5a45307147f19f2d69a3de1f53e0a73ba4c3368eb25a66b4098fb54cb83822f
|
oid sha256:ef245aae271ccae628bb4171f7e601194c77fd18888ef2ea829bea75bd38b0e5
|
||||||
size 64203
|
size 64965
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0102aa84db99a6da1db1de3abf67f13c3b571de00e79e7c55805dc0504658d50
|
oid sha256:e621561567539ff24b4d22b53b65fac6cddae71d92fccd7800a90972a6de3e0e
|
||||||
size 150111
|
size 151100
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:3991cb1f922e0c6712d045b3cd8a1d98165c0fbef7e31b15d587f244e53ec04a
|
oid sha256:e6c2d538be7971169bbc4473945e6815eac8c5dd6372bc1f1897a032b6bca12b
|
||||||
size 59343
|
size 59962
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:355d8f08d08011635bf812aea1edeabd69e1ac3c724b521ed243f2b52e9b444b
|
oid sha256:d705af99624cd2824cd1f520fa05481ac67b8913feebae836db7b99ac60cb466
|
||||||
size 145257
|
size 145841
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:5f4a038f9acbb12880ba6b681ef7d3ae566045c4474aa31e7c6d746c39a649fc
|
oid sha256:38ee4acc23d9c66f127d377ac8a0dd3b683a1465ca319fba092f6d3cdff8c266
|
||||||
size 11108
|
size 11166
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2965482e0161b4ea99aa5b4ece32261dbe246f86fe43054a754fbd556c7a5896
|
oid sha256:ac1941f5eab71bfad020132eae47e1995efa17410b7861aa9f260032e5b0472c
|
||||||
size 21666
|
size 21785
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7592ca6213497f686d105a2e686d0c5de364388ddd174cbe8abb425d27ddcab0
|
oid sha256:b1f1a4dd9de1d8405c527c7f8f04b42ed9d403d0ec507bb3ff650a6896f28df0
|
||||||
size 28505
|
size 28628
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:3a1adf0903f0fc50323c2d77bbc491c950ab0dae6593c004770ea7961c2c6273
|
oid sha256:af05a9b66340e0c128d823d3935a23bcf17cfeac02a822e7277234a9c8eb26e0
|
||||||
size 33270
|
size 33393
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:ad75a0e568e04c20d0e3b823c7e4906c39dcd0a69a086d8e30714a9e4530d031
|
oid sha256:cfc03625c268f0ae067d2f4521a8668b47e4bc8525350d77a480840a09cd5083
|
||||||
size 2128
|
size 2046
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0f65b7221ac74991c526b68ad2469f42801f6083c9acead5bc923fd856a6311d
|
oid sha256:24c85a987b0b80961b656f386f529b7538ddee59a030d02a0946d0f714ce7004
|
||||||
size 368614
|
size 368329
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f89cc5b17821c9f30f7a086bb37668e4e7913705d42c0678fb0f42c527abb868
|
oid sha256:8f14f770785d01b1673d1c8ca780bfff72e51992794dc7233cf5ec4ea99cb3e9
|
||||||
size 334498
|
size 350648
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b7f87fb417453a98e7059535cb68b12549d65f8da7cedf7a48e7154686931e16
|
oid sha256:231ceab75a602eedcd11f4f4ed34f38fb9d072f5cb54e135a7e02d33d257f86b
|
||||||
size 419858
|
size 433973
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a2a017c2b93d1920ae85792c13eafa2fd43f93b2e3bbaa5981ed3a43050c0995
|
oid sha256:d53f67fb3a3717f7bc5ce99b93bc21d1d6580899dfe8e1371ff22bb416af0786
|
||||||
size 11808
|
size 12114
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:42cbc8f8740f56ce45c356262d9b872e3973844ce552c6c09e3c07425c3f86b6
|
oid sha256:e298d89e6fb434e5010d96661fca40bf119118b6b31fdd9fc13201bcd74c8ffd
|
||||||
size 14835
|
size 15149
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:11fdd4bde01102e7998defcaa80c1105ec9418152314c74ee028b692b26c6be8
|
oid sha256:a0581d601f1e536298cb52bfc8a167aa37aebdf065fc910973a752c9c159223d
|
||||||
size 14407
|
size 14733
|
||||||
|
|||||||
BIN
web_demo/favicon.ico
Executable file → Normal file
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 2.9 KiB |