mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 00:15:06 +00:00
fix(panel): drop the pid column from Info → Processes
The pid sat in a column of its own on every row, beside CPU% and memory. It reads as a port number at a glance and is not what the list is read for; the row's name, CPU% and memory already say which process is which.
This commit is contained in:
@@ -17,7 +17,6 @@ use crate::ui::right_panel::{META, META_MONO};
|
||||
|
||||
const CPU_W: f32 = 40.;
|
||||
const MEM_W: f32 = 52.;
|
||||
const PID_W: f32 = 44.;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
struct Sample {
|
||||
@@ -109,7 +108,7 @@ fn cell(text: String, w: f32, mono: SharedString, cx: &App) -> impl IntoElement
|
||||
.child(text)
|
||||
}
|
||||
|
||||
/// CPU%, memory and pid, right-aligned in fixed columns so rows line up.
|
||||
/// CPU% and memory, right-aligned in fixed columns so rows line up.
|
||||
pub(crate) fn row_cells(
|
||||
p: &ProcEntry,
|
||||
cpu: &CpuTracker,
|
||||
@@ -128,10 +127,9 @@ pub(crate) fn row_cells(
|
||||
.child(cell(
|
||||
p.rss.map(compact_bytes).unwrap_or_default(),
|
||||
MEM_W,
|
||||
mono.clone(),
|
||||
mono,
|
||||
cx,
|
||||
))
|
||||
.child(cell(p.pid.to_string(), PID_W, mono, cx))
|
||||
}
|
||||
|
||||
/// The Total line under the tree, or nothing from a daemon that reports no
|
||||
@@ -169,10 +167,9 @@ pub(crate) fn total_row(
|
||||
.child(cell(
|
||||
rss.map(compact_bytes).unwrap_or_default(),
|
||||
MEM_W,
|
||||
mono.clone(),
|
||||
mono,
|
||||
cx,
|
||||
))
|
||||
.child(cell(String::new(), PID_W, mono, cx)),
|
||||
)),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user