From 469adc63a4d082683923fc5af6bc394b8a05233f Mon Sep 17 00:00:00 2001 From: Isaac Mills Date: Wed, 6 Mar 2024 18:04:23 -0500 Subject: [PATCH] Fix example --- Cargo.lock | 87 ++++++++--------------------------------- Cargo.toml | 2 +- examples/hello-world.rs | 4 +- 3 files changed, 20 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9866f53..1cc9b0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,24 +972,17 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "ecolor" -version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" -dependencies = [ - "bytemuck", -] - [[package]] name = "eframe" version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c456c1bb6d13bf68b780257484703d750c70a23ff891ba35f4d6e23a4dbdf26f" dependencies = [ "bytemuck", "cocoa", "document-features", - "egui 0.26.2 (git+https://github.com/emilk/egui)", - "egui-wgpu 0.26.2 (git+https://github.com/emilk/egui)", + "egui", + "egui-wgpu", "egui-winit", "egui_glow", "glow", @@ -1020,20 +1013,10 @@ name = "egui" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180f595432a5b615fc6b74afef3955249b86cfea72607b40740a4cd60d5297d0" -dependencies = [ - "ahash", - "epaint 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher", -] - -[[package]] -name = "egui" -version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" dependencies = [ "accesskit", "ahash", - "epaint 0.26.2 (git+https://github.com/emilk/egui)", + "epaint", "log", "nohash-hasher", ] @@ -1043,8 +1026,8 @@ name = "egui-glyphon" version = "0.1.0" dependencies = [ "eframe", - "egui 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "egui-wgpu 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", + "egui", + "egui-wgpu", "env_logger", "glyphon", ] @@ -1057,24 +1040,8 @@ checksum = "86f2d75e1e70228e7126f828bac05f9fe0e7ea88e9660c8cebe609bb114c61d4" dependencies = [ "bytemuck", "document-features", - "egui 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "epaint 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log", - "thiserror", - "type-map", - "web-time", - "wgpu", -] - -[[package]] -name = "egui-wgpu" -version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" -dependencies = [ - "bytemuck", - "document-features", - "egui 0.26.2 (git+https://github.com/emilk/egui)", - "epaint 0.26.2 (git+https://github.com/emilk/egui)", + "egui", + "epaint", "log", "thiserror", "type-map", @@ -1086,11 +1053,12 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4d44f8d89f70d4480545eb2346b76ea88c3022e9f4706cebc799dbe8b004a2" dependencies = [ "accesskit_winit", "arboard", - "egui 0.26.2 (git+https://github.com/emilk/egui)", + "egui", "log", "raw-window-handle 0.6.0", "smithay-clipboard", @@ -1102,10 +1070,11 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08e3be8728b4c59493dbfec041c657e6725bdeafdbd49aef3f1dbb9e551fa01" dependencies = [ "bytemuck", - "egui 0.26.2 (git+https://github.com/emilk/egui)", + "egui", "glow", "log", "memoffset 0.9.0", @@ -1123,14 +1092,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "emath" -version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" -dependencies = [ - "bytemuck", -] - [[package]] name = "enumflags2" version = "0.7.9" @@ -1184,22 +1145,8 @@ dependencies = [ "ab_glyph", "ahash", "bytemuck", - "ecolor 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "emath 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher", - "parking_lot", -] - -[[package]] -name = "epaint" -version = "0.26.2" -source = "git+https://github.com/emilk/egui#a1d5145c16aba4d0b11668d496735d07520d0339" -dependencies = [ - "ab_glyph", - "ahash", - "bytemuck", - "ecolor 0.26.2 (git+https://github.com/emilk/egui)", - "emath 0.26.2 (git+https://github.com/emilk/egui)", + "ecolor", + "emath", "log", "nohash-hasher", "parking_lot", diff --git a/Cargo.toml b/Cargo.toml index 23d6378..1fa91b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,5 +11,5 @@ egui-wgpu = "0.26.2" glyphon = { git = "https://github.com/StratusFearMe21/glyphon", version = "0.5.0" } [dev-dependencies] -eframe = { git = "https://github.com/emilk/egui", features = ["wgpu"] } +eframe = { version = "0.26.2", features = ["wgpu"] } env_logger = "0.11.1" diff --git a/examples/hello-world.rs b/examples/hello-world.rs index ec98354..30f8965 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -69,7 +69,7 @@ impl Default for MyApp { buffer.set_size(&mut font_system, 16.0, 9.0); buffer.set_text(&mut font_system, "<== Hello world! ==> 👋\nThis is rendered with 🦅 glyphon 🦁\nThe text below should be partially clipped.\na b c d e f g h i j k l m n o p q r s t u v w x y z", Attrs::new().family(Family::SansSerif), Shaping::Advanced); - buffer.shape_until_scroll(&mut font_system); + buffer.shape_until_scroll(&mut font_system, true); Self { font_system: Arc::new(Mutex::new(font_system)), buffer: Arc::new(RwLock::new(buffer)), @@ -99,7 +99,7 @@ impl eframe::App for MyApp { let mut buffer = self.buffer.write(); buffer.set_metrics(&mut font_system, Metrics::new(self.size, self.size)); buffer.set_size(&mut font_system, size.x, size.y); - buffer.shape_until_scroll(&mut font_system); + buffer.shape_until_scroll(&mut font_system, true); } egui::CentralPanel::default().show(ctx, |ui| {