From 4c77faff60c6c7279d2fe3fbe1d99a0630d41a39 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Thu, 30 May 2024 16:13:19 +0300 Subject: [PATCH] ui: fix node paddings, color of button to add wallet connection --- src/gui/views/network/metrics.rs | 5 ++--- src/gui/views/network/node.rs | 2 +- src/gui/views/views.rs | 2 +- src/gui/views/wallets/setup/connection.rs | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gui/views/network/metrics.rs b/src/gui/views/network/metrics.rs index 5d32ef7..d7fab7d 100644 --- a/src/gui/views/network/metrics.rs +++ b/src/gui/views/network/metrics.rs @@ -77,7 +77,7 @@ impl NetworkTab for NetworkMetrics { } } -const BLOCK_ITEM_HEIGHT: f32 = 79.0; +const BLOCK_ITEM_HEIGHT: f32 = 78.0; /// Draw emission and difficulty info. fn info_ui(ui: &mut egui::Ui, stats: &ServerStats) { @@ -147,7 +147,7 @@ fn blocks_ui(ui: &mut egui::Ui, stats: &ServerStats) { .stick_to_bottom(true) .show_rows( ui, - BLOCK_ITEM_HEIGHT - 1.0, + BLOCK_ITEM_HEIGHT, blocks_size, |ui, row_range| { for index in row_range { @@ -206,7 +206,6 @@ fn block_item_ui(ui: &mut egui::Ui, db: &DiffBlock, rounding: Rounding) { .color(Colors::gray()) .size(16.0)); }); - ui.add_space(3.0); }); ui.add_space(6.0); diff --git a/src/gui/views/network/node.rs b/src/gui/views/network/node.rs index 4175420..8b30457 100644 --- a/src/gui/views/network/node.rs +++ b/src/gui/views/network/node.rs @@ -201,7 +201,7 @@ fn peer_item_ui(ui: &mut egui::Ui, peer: &PeerStats, rounding: Rounding) { rect.set_height(79.0); ui.allocate_ui_at_rect(rect, |ui| { ui.vertical(|ui| { - ui.add_space(3.0); + ui.add_space(4.0); // Draw round background. ui.painter().rect(rect, rounding, Colors::white_or_black(false), View::item_stroke()); diff --git a/src/gui/views/views.rs b/src/gui/views/views.rs index 96a91c7..2ad7879 100644 --- a/src/gui/views/views.rs +++ b/src/gui/views/views.rs @@ -540,7 +540,7 @@ impl View { // Draw box label. ui.label(RichText::new(label).color(Colors::gray()).size(15.0)); }); - ui.add_space(3.0); + ui.add_space(2.0); }); }).response; diff --git a/src/gui/views/wallets/setup/connection.rs b/src/gui/views/wallets/setup/connection.rs index 0065da0..2ebb347 100644 --- a/src/gui/views/wallets/setup/connection.rs +++ b/src/gui/views/wallets/setup/connection.rs @@ -158,7 +158,7 @@ impl ConnectionSetup { // Show button to add new external node connection. let add_node_text = format!("{} {}", PLUS_CIRCLE, t!("wallets.add_node")); - View::button(ui, add_node_text, Colors::white_or_black(false), || { + View::button(ui, add_node_text, Colors::button(), || { self.show_add_ext_conn_modal(cb); }); ui.add_space(4.0);