diff --git a/src/app.rs b/src/app.rs index 87d3490..a85a3cd 100644 --- a/src/app.rs +++ b/src/app.rs @@ -194,7 +194,8 @@ impl AppState { "tcp://127.0.0.1:23708", core_message_sender.clone(), // Clone the sender for each listener Some(mainnet_app_context.sx_zmq_status.clone()), - ).expect("Failed to create mainnet InstantSend listener"); + ) + .expect("Failed to create mainnet InstantSend listener"); let tx_zmq_status_option = match testnet_app_context { Some(ref context) => Some(context.sx_zmq_status.clone()), @@ -206,7 +207,8 @@ impl AppState { "tcp://127.0.0.1:23709", core_message_sender, // Use the original sender or create a new one if needed tx_zmq_status_option, - ).expect("Failed to create testnet InstantSend listener"); + ) + .expect("Failed to create testnet InstantSend listener"); Self { main_screens: [ diff --git a/src/components/core_zmq_listener.rs b/src/components/core_zmq_listener.rs index 46ca5e2..ff0de26 100644 --- a/src/components/core_zmq_listener.rs +++ b/src/components/core_zmq_listener.rs @@ -11,10 +11,10 @@ use std::sync::{ use std::thread; use std::time::Duration; -#[cfg(not(target_os = "windows"))] -use zmq::Context; #[cfg(not(target_os = "windows"))] use image::EncodableLayout; +#[cfg(not(target_os = "windows"))] +use zmq::Context; #[cfg(target_os = "windows")] use futures::StreamExt; diff --git a/src/ui/wallet/add_new_wallet_screen.rs b/src/ui/wallet/add_new_wallet_screen.rs index 0c7adfe..23ebc5a 100644 --- a/src/ui/wallet/add_new_wallet_screen.rs +++ b/src/ui/wallet/add_new_wallet_screen.rs @@ -12,6 +12,7 @@ use dash_sdk::dashcore_rpc::dashcore::bip32::{ChildNumber, DerivationPath}; use dash_sdk::dashcore_rpc::dashcore::key::Secp256k1; use dash_sdk::dpp::dashcore::bip32::{ExtendedPrivKey, ExtendedPubKey}; use dash_sdk::dpp::dashcore::Network; +use eframe::emath::Align; use egui::{ Color32, ComboBox, Direction, FontId, Frame, Grid, Layout, Margin, RichText, Stroke, TextStyle, Ui, Vec2, @@ -269,16 +270,19 @@ impl AddNewWalletScreen { .min_row_height(row_height) .show(ui, |ui| { for (i, word) in mnemonic.words().enumerate() { + let number_text = RichText::new(format!("{} ", i + 1)) + .size(row_height * 0.2) + .color(Color32::GRAY); + let word_text = RichText::new(word) .size(row_height * 0.5) - .monospace(); + .color(Color32::BLACK); ui.with_layout( - Layout::centered_and_justified( - Direction::LeftToRight, - ), + Layout::left_to_right(Align::Min), |ui| { - ui.label(word_text); + ui.label(number_text); // Add the number with the vertical offset + ui.label(word_text); // Add the word }, );