fix ComboBox width

This commit is contained in:
hinto.janai 2023-12-28 09:04:50 -05:00
parent 4f177ce951
commit 62865f7c41
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 3 additions and 3 deletions

View file

@ -151,7 +151,7 @@ impl crate::disk::P2pool {
debug!("P2Pool Tab | Rendering [ComboBox] of Remote Nodes"); debug!("P2Pool Tab | Rendering [ComboBox] of Remote Nodes");
let ip_location = crate::node::format_ip_location(&self.node, false); let ip_location = crate::node::format_ip_location(&self.node, false);
let text = RichText::new(format!("{}ms | {}", ms, ip_location)).color(color); let text = RichText::new(format!("{}ms | {}", ms, ip_location)).color(color);
ComboBox::from_id_source("remote_nodes").selected_text(text).show_ui(ui, |ui| { ComboBox::from_id_source("remote_nodes").selected_text(text).width(width).show_ui(ui, |ui| {
for data in lock!(ping).nodes.iter() { for data in lock!(ping).nodes.iter() {
let ms = crate::node::format_ms(data.ms); let ms = crate::node::format_ms(data.ms);
let ip_location = crate::node::format_ip_location(data.ip, true); let ip_location = crate::node::format_ip_location(data.ip, true);
@ -338,7 +338,7 @@ impl crate::disk::P2pool {
// [Ping List] // [Ping List]
debug!("P2Pool Tab | Rendering [Node List]"); debug!("P2Pool Tab | Rendering [Node List]");
let text = RichText::new(format!("{}. {}", self.selected_index+1, self.selected_name)); let text = RichText::new(format!("{}. {}", self.selected_index+1, self.selected_name));
ComboBox::from_id_source("manual_nodes").selected_text(text).show_ui(ui, |ui| { ComboBox::from_id_source("manual_nodes").selected_text(text).width(width).show_ui(ui, |ui| {
let mut n = 0; let mut n = 0;
for (name, node) in node_vec.iter() { for (name, node) in node_vec.iter() {
let text = RichText::new(format!("{}. {}\n IP: {}\n RPC: {}\n ZMQ: {}", n+1, name, node.ip, node.rpc, node.zmq)); let text = RichText::new(format!("{}. {}\n IP: {}\n RPC: {}\n ZMQ: {}", n+1, name, node.ip, node.rpc, node.zmq));

View file

@ -228,7 +228,7 @@ impl crate::disk::Xmrig {
// [Node List] // [Node List]
debug!("XMRig Tab | Rendering [Node List] ComboBox"); debug!("XMRig Tab | Rendering [Node List] ComboBox");
let text = RichText::new(format!("{}. {}", self.selected_index+1, self.selected_name)); let text = RichText::new(format!("{}. {}", self.selected_index+1, self.selected_name));
ComboBox::from_id_source("manual_pool").selected_text(text).show_ui(ui, |ui| { ComboBox::from_id_source("manual_pool").selected_text(text).width(width).show_ui(ui, |ui| {
let mut n = 0; let mut n = 0;
for (name, pool) in pool_vec.iter() { for (name, pool) in pool_vec.iter() {
let text = format!("{}. {}\n IP: {}\n Port: {}\n Rig: {}", n+1, name, pool.ip, pool.port, pool.rig); let text = format!("{}. {}\n IP: {}\n Port: {}\n Rig: {}", n+1, name, pool.ip, pool.port, pool.rig);