diff --git a/Cargo.lock b/Cargo.lock index 922e10ce..a7f46f5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2260,7 +2260,7 @@ dependencies = [ [[package]] name = "ecolor" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "bytemuck", "emath", @@ -2330,7 +2330,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ahash", "bytemuck", @@ -2364,7 +2364,7 @@ dependencies = [ [[package]] name = "egui" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ahash", "bitflags 2.9.1", @@ -2373,13 +2373,14 @@ dependencies = [ "log", "nohash-hasher", "profiling", + "smallvec", "unicode-segmentation", ] [[package]] name = "egui-winit" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ahash", "arboard", @@ -2397,7 +2398,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ahash", "egui", @@ -2412,7 +2413,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ahash", "bytemuck", @@ -2453,7 +2454,7 @@ dependencies = [ [[package]] name = "emath" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "bytemuck", ] @@ -2568,7 +2569,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" +source = "git+https://github.com/emilk/egui?rev=f11a3510ba07ae87747d744d952676476a88c24e#f11a3510ba07ae87747d744d952676476a88c24e" dependencies = [ "ab_glyph", "ahash", diff --git a/Cargo.toml b/Cargo.toml index 7a56f3cd..5c2c3470 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -154,8 +154,8 @@ winit = { version = "0.30.11", features = ["android-native-activity"] } eframe = { version = "0.31.1", default-features = false, features = ["glow", "android-native-activity"] } [patch.crates-io] -egui_extras = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } -egui = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } -eframe = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } +egui_extras = { git = "https://github.com/emilk/egui", rev = "f11a3510ba07ae87747d744d952676476a88c24e" } +egui = { git = "https://github.com/emilk/egui", rev = "f11a3510ba07ae87747d744d952676476a88c24e" } +eframe = { git = "https://github.com/emilk/egui", rev = "f11a3510ba07ae87747d744d952676476a88c24e" } ### patch grin store #grin_store = { path = "../grin-store" } diff --git a/src/gui/views/qr.rs b/src/gui/views/qr.rs index 1b3006bd..2687903a 100644 --- a/src/gui/views/qr.rs +++ b/src/gui/views/qr.rs @@ -269,8 +269,12 @@ impl QrCodeContent { // Draw QR code image. let mut content_rect = ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { ui.add_space(10.0); - let size = SizeHint::Size(ui.available_width() as u32, ui.available_width() as u32); - self.texture_handle = Some(View::svg_image(ui, "qr", svg.as_slice(), Some(size))); + let size = SizeHint::Size { + width: ui.available_width() as u32, + height: ui.available_width() as u32, + maintain_aspect_ratio: true, + }; + self.texture_handle = Some(View::svg_image(ui, "qr", svg.as_slice(), size)); ui.add_space(10.0); }).response.rect; diff --git a/src/gui/views/views.rs b/src/gui/views/views.rs index 512f6be3..269d4242 100644 --- a/src/gui/views/views.rs +++ b/src/gui/views/views.rs @@ -565,7 +565,7 @@ impl View { pub fn svg_image(ui: &mut egui::Ui, name: &str, svg: &[u8], - size: Option) -> TextureHandle { + size: SizeHint) -> TextureHandle { let color_img = load_svg_bytes_with_size(svg, size, &usvg::Options::default()).unwrap(); // Create image texture. let texture_handle = ui.ctx().load_texture(name, diff --git a/src/gui/views/wallets/wallet/txs/tx.rs b/src/gui/views/wallets/wallet/txs/tx.rs index 18e672e3..0a27eda0 100644 --- a/src/gui/views/wallets/wallet/txs/tx.rs +++ b/src/gui/views/wallets/wallet/txs/tx.rs @@ -22,7 +22,7 @@ use crate::gui::platform::PlatformCallbacks; use crate::gui::views::wallets::wallet::txs::WalletTransactions; use crate::gui::views::{CameraContent, FilePickContent, FilePickContentType, Modal, QrCodeContent, View}; use crate::gui::Colors; -use crate::wallet::types::{WalletTask, WalletTransaction, WalletTransactionAction}; +use crate::wallet::types::{WalletTask, WalletTransaction}; use crate::wallet::Wallet; /// Transaction information [`Modal`] content.