mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Merge branch 'main' into lucas/experiments/measure-widget-size
# Conflicts: # crates/egui/src/atomics/atom.rs # crates/egui/src/atomics/atom_kind.rs # crates/egui/src/atomics/atom_layout.rs # crates/egui/src/containers/sides.rs # crates/egui/src/placer.rs # crates/egui/src/widgets/label.rs # crates/egui/src/widgets/selected_label.rs # crates/egui_demo_lib/src/demo/dancing_strings.rs # crates/egui_extras/src/layout.rs # crates/epaint/src/text/text_layout_types.rs
This commit is contained in:
@@ -3,8 +3,8 @@ name = "confirm_exit"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3122591a76a063f1db0b88b54ecc4afe012ee27a1404c0948d0b9d639aeeece6
|
||||
size 3124
|
||||
oid sha256:0175461bbd86fffaad3538ea8dcec5001c7511aa201aa37b7736e7d2010b1522
|
||||
size 3483
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "custom_3d_glow"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4dd5ffcf5a530f6fbe959fd74e2f5b4aeaee335baf79ad1cde8e42c34d84156c
|
||||
size 24590
|
||||
oid sha256:b5f36e1df27007b19cf56771145a667b4410dc9f4697afe629a2b42518640d62
|
||||
size 26531
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "custom_font"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d0ab12a55c0d87f044ef7675f5b94b39977f2c5d3a2ea74eb843dfc85d5b9f31
|
||||
size 5645
|
||||
oid sha256:a5bdb725a17bb6f8871ee95ae8cf46e55055083b0be14716cccd17615c863c81
|
||||
size 6179
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "custom_font_style"
|
||||
version = "0.1.0"
|
||||
authors = ["tami5 <kkharji@proton.me>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5d443ef30cf12d2c4367135fd663270ed46f4864af2f3aae424610be86c73197
|
||||
size 66193
|
||||
oid sha256:044417e2259f58b8b71c44c49a60fe928e7faac1616d76eba7e156764c1bc2b2
|
||||
size 88583
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "custom_keypad"
|
||||
version = "0.1.0"
|
||||
authors = ["Varphone Wong <varphone@qq.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use eframe::egui::{self, pos2, vec2, Button, Ui, Vec2};
|
||||
use eframe::egui::{self, Button, Ui, Vec2, pos2, vec2};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq)]
|
||||
enum Transition {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "custom_style"
|
||||
version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use eframe::egui::{
|
||||
self, global_theme_preference_buttons, style::Selection, Color32, Stroke, Style, Theme,
|
||||
self, Color32, Stroke, Style, Theme, global_theme_preference_buttons, style::Selection,
|
||||
};
|
||||
use egui_demo_lib::{View as _, WidgetGallery};
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "custom_window_frame"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bfdf77d119ae7926f52ac781455c4b1574eea53276069614738ba8b13b9921ea
|
||||
size 6024
|
||||
oid sha256:1eba63346816dfbcf90c6b87e8df8b2de989d33359fda91041a813c474f85cc1
|
||||
size 17981
|
||||
|
||||
@@ -75,7 +75,7 @@ fn custom_window_frame(ctx: &egui::Context, title: &str, add_contents: impl FnOn
|
||||
}
|
||||
|
||||
fn title_bar_ui(ui: &mut egui::Ui, title_bar_rect: eframe::epaint::Rect, title: &str) {
|
||||
use egui::{vec2, Align2, FontId, Id, PointerButton, Sense, UiBuilder};
|
||||
use egui::{Align2, FontId, Id, PointerButton, Sense, UiBuilder, vec2};
|
||||
|
||||
let painter = ui.painter();
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "external_eventloop"
|
||||
version = "0.1.0"
|
||||
authors = ["Will Brown <opensource@rebeagle.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
3
examples/external_eventloop/screenshot.png
Normal file
3
examples/external_eventloop/screenshot.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2f2630b0cfe5b044698e9f9533752e23a130e1984dfa0123645bc040d412dba5
|
||||
size 8636
|
||||
@@ -1,7 +1,7 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use eframe::{egui, UserEvent};
|
||||
use eframe::{UserEvent, egui};
|
||||
use std::{cell::Cell, rc::Rc};
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "external_eventloop_async"
|
||||
version = "0.1.0"
|
||||
authors = ["Will Brown <opensource@rebeagle.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use eframe::{egui, EframePumpStatus, UserEvent};
|
||||
use eframe::{EframePumpStatus, UserEvent, egui};
|
||||
use std::{cell::Cell, io, os::fd::AsRawFd as _, rc::Rc, time::Duration};
|
||||
use tokio::task::LocalSet;
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "file_dialog"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "hello_android"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
# `unsafe_code` is required for `#[no_mangle]`, disable workspace lints to workaround lint error.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use eframe::{egui, CreationContext};
|
||||
use eframe::{CreationContext, egui};
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
#[no_mangle]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "hello_world"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "hello_world_par"
|
||||
version = "0.1.0"
|
||||
authors = ["Maxim Osipenko <maxim1999max@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "hello_world_simple"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0bb13d0cb819d30ffbcd12d9327589a1e3ca226943cb381fa17eccfb8f7c06fb
|
||||
size 3229
|
||||
oid sha256:7be893df63405f3e86d1eb280083914a7ac63bb21fb8dce47e0476fb48ec9bd8
|
||||
size 8293
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "images"
|
||||
version = "0.1.0"
|
||||
authors = ["Jan Procházka <github.com/jprochazk>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a836741d52e1972b2047cefaabf59f601637d430d4b41bf6407ebda4f7931dac
|
||||
size 273450
|
||||
oid sha256:329972caa792f9e3a7caf207f41c35e1e26f0d09067e9282bf6538d560f13f7c
|
||||
size 79617
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "keyboard_events"
|
||||
version = "0.1.0"
|
||||
authors = ["Jose Palazon <jose@palako.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cf53e0da26c4295bafe9cbb9ea0ad8c50933e29eb67467c3a11783697ec5494
|
||||
size 7525
|
||||
oid sha256:45fce5a660dbca5a2ecca2fa93fa99b67dce7b03ad583fb5d44d2642d052a80c
|
||||
size 8603
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "multiple_viewports"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
|
||||
use eframe::egui;
|
||||
|
||||
3
examples/popups/screenshot.png
Normal file
3
examples/popups/screenshot.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e082670ac9daaee83e593c5dab0e3fccc6f6a4b824071f4983f7f51da144cad9
|
||||
size 17893
|
||||
@@ -3,8 +3,8 @@ name = "puffin_profiler"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[package.metadata.cargo-machete]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:610b003b4c7715751d2d3753d304e2c5a0af17c9259fa24f21a97b33b9d0c3c7
|
||||
size 8549
|
||||
oid sha256:0787ac28dc8a0ca979f9be5f20c3fb1e2e1c5733add61d201bfe965590afe062
|
||||
size 25999
|
||||
|
||||
@@ -2,15 +2,21 @@
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
|
||||
use eframe::egui;
|
||||
|
||||
fn main() -> eframe::Result {
|
||||
let rust_log = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_owned());
|
||||
std::env::set_var("RUST_LOG", rust_log);
|
||||
|
||||
// SAFETY: we call this from the main thread without any other threads running.
|
||||
#[expect(unsafe_code)]
|
||||
unsafe {
|
||||
std::env::set_var("RUST_LOG", rust_log);
|
||||
};
|
||||
|
||||
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
|
||||
start_puffin_server(); // NOTE: you may only want to call this if the users specifies some flag or clicks a button!
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ authors = [
|
||||
"Andreas Faber <andreas.mfaber@gmail.com",
|
||||
]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "serial_windows"
|
||||
version = "0.1.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -3,8 +3,8 @@ name = "user_attention"
|
||||
version = "0.1.0"
|
||||
authors = ["TicClick <ya@ticclick.ch>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.84"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:85a508fa7d16d9bc51f38d3531b30f024d8888f7f74bf2f351453fd13d13e0aa
|
||||
size 5928
|
||||
oid sha256:1d723a89d05be6e254846b8999041c54d5142baefcb8ad8c1effa5a50bae7791
|
||||
size 6578
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use eframe::{egui, CreationContext, NativeOptions};
|
||||
use eframe::{CreationContext, NativeOptions, egui};
|
||||
use egui::{Button, CentralPanel, Context, UserAttentionType};
|
||||
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
Reference in New Issue
Block a user