mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-16 03:38:55 +00:00
ui: fix network content paddings and panel width
This commit is contained in:
@@ -84,6 +84,8 @@ impl ConnectionsContent {
|
||||
// Draw modal content for current ui container.
|
||||
self.current_modal_ui(ui, frame, cb);
|
||||
|
||||
ui.add_space(2.0);
|
||||
|
||||
// Show network type selection.
|
||||
let saved_chain_type = AppConfig::chain_type();
|
||||
NodeSetup::chain_type_ui(ui);
|
||||
@@ -184,7 +186,7 @@ impl ConnectionsContent {
|
||||
cb: &dyn PlatformCallbacks) {
|
||||
// Setup layout size.
|
||||
let mut rect = ui.available_rect_before_wrap();
|
||||
rect.set_height(53.0);
|
||||
rect.set_height(52.0);
|
||||
|
||||
// Draw round background.
|
||||
let bg_rect = rect.clone();
|
||||
@@ -306,7 +308,7 @@ impl ConnectionsContent {
|
||||
|
||||
// Show error when specified URL is not valid.
|
||||
if self.ext_node_url_error {
|
||||
ui.add_space(12.0);
|
||||
ui.add_space(2.0);
|
||||
ui.label(RichText::new(t!("wallets.invalid_url"))
|
||||
.size(17.0)
|
||||
.color(Colors::RED));
|
||||
|
||||
@@ -134,7 +134,7 @@ impl NetworkContent {
|
||||
let mut rect = ui.available_rect_before_wrap();
|
||||
let mut width = ui.available_width();
|
||||
if !Root::is_dual_panel_mode(frame) {
|
||||
width = f32::min(width, Root::SIDE_PANEL_WIDTH * 1.3)
|
||||
width = f32::min(width, Root::SIDE_PANEL_WIDTH * 1.4)
|
||||
}
|
||||
rect.set_width(width);
|
||||
|
||||
|
||||
@@ -105,10 +105,11 @@ impl NodeSetup {
|
||||
|
||||
View::sub_title(ui, format!("{} {}", COMPUTER_TOWER, t!("network_settings.server")));
|
||||
View::horizontal_line(ui, Colors::STROKE);
|
||||
ui.add_space(4.0);
|
||||
ui.add_space(6.0);
|
||||
|
||||
// Show chain type setup.
|
||||
Self::chain_type_ui(ui);
|
||||
ui.add_space(2.0);
|
||||
|
||||
// Show loading indicator or controls to stop/start/restart node.
|
||||
if Node::is_stopping() || Node::is_restarting() || Node::is_starting() {
|
||||
@@ -221,7 +222,6 @@ impl NodeSetup {
|
||||
|
||||
/// Draw [`ChainTypes`] setup content.
|
||||
pub fn chain_type_ui(ui: &mut egui::Ui) {
|
||||
ui.add_space(1.0);
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.label(RichText::new(t!("network.type")).size(16.0).color(Colors::GRAY));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user