ui: wallet sync messages width
This commit is contained in:
parent
589d6ecbbc
commit
4bf4af5b0d
1 changed files with 49 additions and 45 deletions
|
@ -384,21 +384,23 @@ impl WalletContent {
|
|||
return true;
|
||||
} else if wallet.get_current_ext_conn_id().is_none() {
|
||||
if !Node::is_running() || Node::is_stopping() {
|
||||
let dual_panel_root = Root::is_dual_panel_mode(ui);
|
||||
View::center_content(ui, 108.0, |ui| {
|
||||
View::max_width_ui(ui, Root::SIDE_PANEL_WIDTH * 1.5, |ui| {
|
||||
let text = t!("wallets.enable_node", "settings" => GEAR_FINE);
|
||||
ui.label(RichText::new(text).size(16.0).color(Colors::INACTIVE_TEXT));
|
||||
ui.add_space(8.0);
|
||||
// Show button to enable integrated node at non-dual root panel mode
|
||||
// or when network connections are not showing and node is not stopping
|
||||
let dual_panel_root = Root::is_dual_panel_mode(ui);
|
||||
if (!dual_panel_root || AppConfig::show_connections_network_panel())
|
||||
&& !Node::is_stopping() {
|
||||
let enable_node_text = format!("{} {}", POWER, t!("network.enable_node"));
|
||||
View::button(ui, enable_node_text, Colors::GOLD, || {
|
||||
let enable_text = format!("{} {}", POWER, t!("network.enable_node"));
|
||||
View::button(ui, enable_text, Colors::GOLD, || {
|
||||
Node::start();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
return true
|
||||
} else if wallet.sync_error()
|
||||
&& Node::get_sync_status() == Some(SyncStatus::NoSync) {
|
||||
|
@ -446,6 +448,7 @@ impl WalletContent {
|
|||
/// Draw wallet sync progress content.
|
||||
pub fn sync_progress_ui(ui: &mut egui::Ui, wallet: &Wallet) {
|
||||
View::center_content(ui, 162.0, |ui| {
|
||||
View::max_width_ui(ui, Root::SIDE_PANEL_WIDTH * 1.5, |ui| {
|
||||
View::big_loading_spinner(ui);
|
||||
ui.add_space(18.0);
|
||||
// Setup sync progress text.
|
||||
|
@ -482,6 +485,7 @@ impl WalletContent {
|
|||
};
|
||||
ui.label(RichText::new(text).size(16.0).color(Colors::INACTIVE_TEXT));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue