gardesk/gartop / 18b434e

Browse files

Fix process list header/row text positioning for Pango top-left coords

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
18b434ef096fbf09e78ace6e6afc85a55e5f2e38
Parents
188cf80
Tree
1ea1857

1 changed file

StatusFile+-
M gartop/src/gui/process_list.rs 3 3
gartop/src/gui/process_list.rsmodified
@@ -141,8 +141,8 @@ impl ProcessList {
141141
         let col_mem = x + 300.0;
142142
         let col_user = x + 390.0;
143143
 
144
-        // Header
145
-        let header_y = self.bounds.y as f64 + 16.0;
144
+        // Header - position text near top (Pango uses top-left positioning)
145
+        let header_y = self.bounds.y as f64 + 4.0;
146146
         renderer.text("PID", col_pid, header_y, &header_style)?;
147147
         renderer.text("Name", col_name, header_y, &header_style)?;
148148
 
@@ -184,7 +184,7 @@ impl ProcessList {
184184
             .enumerate()
185185
         {
186186
             let row_y = start_y + (i as i32 * ROW_HEIGHT as i32);
187
-            let text_y = row_y as f64 + 16.0;
187
+            let text_y = row_y as f64 + 4.0; // Pango uses top-left positioning
188188
             let process_idx = self.scroll_offset + i;
189189
 
190190
             // Selection highlight