Skip to content

Commit 9648901

Browse files
fmt and better numbering of words
1 parent 271c979 commit 9648901

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/app.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ impl AppState {
194194
"tcp://127.0.0.1:23708",
195195
core_message_sender.clone(), // Clone the sender for each listener
196196
Some(mainnet_app_context.sx_zmq_status.clone()),
197-
).expect("Failed to create mainnet InstantSend listener");
197+
)
198+
.expect("Failed to create mainnet InstantSend listener");
198199

199200
let tx_zmq_status_option = match testnet_app_context {
200201
Some(ref context) => Some(context.sx_zmq_status.clone()),
@@ -206,7 +207,8 @@ impl AppState {
206207
"tcp://127.0.0.1:23709",
207208
core_message_sender, // Use the original sender or create a new one if needed
208209
tx_zmq_status_option,
209-
).expect("Failed to create testnet InstantSend listener");
210+
)
211+
.expect("Failed to create testnet InstantSend listener");
210212

211213
Self {
212214
main_screens: [

src/components/core_zmq_listener.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use std::sync::{
1111
use std::thread;
1212
use std::time::Duration;
1313

14-
#[cfg(not(target_os = "windows"))]
15-
use zmq::Context;
1614
#[cfg(not(target_os = "windows"))]
1715
use image::EncodableLayout;
16+
#[cfg(not(target_os = "windows"))]
17+
use zmq::Context;
1818

1919
#[cfg(target_os = "windows")]
2020
use futures::StreamExt;

src/ui/wallet/add_new_wallet_screen.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use dash_sdk::dashcore_rpc::dashcore::bip32::{ChildNumber, DerivationPath};
1212
use dash_sdk::dashcore_rpc::dashcore::key::Secp256k1;
1313
use dash_sdk::dpp::dashcore::bip32::{ExtendedPrivKey, ExtendedPubKey};
1414
use dash_sdk::dpp::dashcore::Network;
15+
use eframe::emath::Align;
1516
use egui::{
1617
Color32, ComboBox, Direction, FontId, Frame, Grid, Layout, Margin, RichText, Stroke, TextStyle,
1718
Ui, Vec2,
@@ -269,16 +270,19 @@ impl AddNewWalletScreen {
269270
.min_row_height(row_height)
270271
.show(ui, |ui| {
271272
for (i, word) in mnemonic.words().enumerate() {
273+
let number_text = RichText::new(format!("{} ", i + 1))
274+
.size(row_height * 0.2)
275+
.color(Color32::GRAY);
276+
272277
let word_text = RichText::new(word)
273278
.size(row_height * 0.5)
274-
.monospace();
279+
.color(Color32::BLACK);
275280

276281
ui.with_layout(
277-
Layout::centered_and_justified(
278-
Direction::LeftToRight,
279-
),
282+
Layout::left_to_right(Align::Min),
280283
|ui| {
281-
ui.label(word_text);
284+
ui.label(number_text); // Add the number with the vertical offset
285+
ui.label(word_text); // Add the word
282286
},
283287
);
284288

0 commit comments

Comments
 (0)