@@ -366,8 +366,8 @@ impl App { |
| 366 | 366 | self.renderer.fill_rect(backdrop, gartk_core::Color::new(0.0, 0.0, 0.0, 0.75))?; |
| 367 | 367 | |
| 368 | 368 | // Help box dimensions |
| 369 | | - let box_width = 340u32; |
| 370 | | - let box_height = 380u32; |
| 369 | + let box_width = 320u32; |
| 370 | + let box_height = 360u32; |
| 371 | 371 | let box_x = (self.width.saturating_sub(box_width)) / 2; |
| 372 | 372 | let box_y = (self.height.saturating_sub(box_height)) / 2; |
| 373 | 373 | |
@@ -382,56 +382,60 @@ impl App { |
| 382 | 382 | color: self.theme.text, |
| 383 | 383 | ..Default::default() |
| 384 | 384 | }; |
| 385 | | - let x = box_x as f64 + 20.0; |
| 386 | | - let mut y = box_y as f64 + 24.0; |
| 385 | + let x = box_x as f64 + 16.0; |
| 386 | + let mut y = box_y as f64 + 20.0; |
| 387 | 387 | self.renderer.text("Keyboard Shortcuts", x, y, &title_style)?; |
| 388 | 388 | |
| 389 | 389 | // Separator |
| 390 | | - y += 24.0; |
| 391 | | - self.renderer.line(x, y, x + box_width as f64 - 40.0, y, self.theme.border, 1.0)?; |
| 392 | | - y += 16.0; |
| 390 | + y += 22.0; |
| 391 | + self.renderer.line(x, y, x + box_width as f64 - 32.0, y, self.theme.border, 1.0)?; |
| 392 | + y += 12.0; |
| 393 | 393 | |
| 394 | 394 | // Keybindings |
| 395 | 395 | let key_style = TextStyle { |
| 396 | 396 | font_family: "monospace".to_string(), |
| 397 | | - font_size: 11.0, |
| 397 | + font_size: 10.0, |
| 398 | 398 | color: self.theme.cpu_color, |
| 399 | 399 | ..Default::default() |
| 400 | 400 | }; |
| 401 | 401 | let desc_style = TextStyle { |
| 402 | 402 | font_family: "monospace".to_string(), |
| 403 | | - font_size: 11.0, |
| 403 | + font_size: 10.0, |
| 404 | 404 | color: self.theme.text_secondary, |
| 405 | 405 | ..Default::default() |
| 406 | 406 | }; |
| 407 | 407 | |
| 408 | + // Column offset for descriptions |
| 409 | + let desc_x = x + 90.0; |
| 410 | + |
| 408 | 411 | let bindings = [ |
| 409 | 412 | ("?", "Toggle this help"), |
| 410 | | - ("q / Esc", "Quit (Esc clears search first)"), |
| 413 | + ("q / Esc", "Quit / clear search"), |
| 411 | 414 | ("", ""), |
| 412 | | - ("1-4", "Switch to tab (CPU/Mem/Net/Disk)"), |
| 413 | | - ("Tab", "Cycle through tabs"), |
| 415 | + ("1-4", "Switch tab"), |
| 416 | + ("Tab", "Cycle tabs"), |
| 414 | 417 | ("", ""), |
| 415 | | - ("j / \u{2193}", "Select next process"), |
| 416 | | - ("k / \u{2191}", "Select previous process"), |
| 417 | | - ("Home / End", "Jump to first / last"), |
| 418 | | - ("PgUp / PgDn", "Jump 10 rows"), |
| 418 | + ("j / \u{2193}", "Next process"), |
| 419 | + ("k / \u{2191}", "Previous process"), |
| 420 | + ("Home", "First process"), |
| 421 | + ("End", "Last process"), |
| 422 | + ("PgUp/PgDn", "Jump 10 rows"), |
| 419 | 423 | ("", ""), |
| 420 | | - ("f", "Freeze process list"), |
| 421 | | - ("/", "Search / filter by name"), |
| 424 | + ("f", "Freeze list"), |
| 425 | + ("/", "Search by name"), |
| 422 | 426 | ("", ""), |
| 423 | | - ("K", "Kill selected (SIGTERM)"), |
| 424 | | - ("X", "Force kill (SIGKILL)"), |
| 425 | | - ("r", "Force refresh"), |
| 427 | + ("K", "Kill (SIGTERM)"), |
| 428 | + ("X", "Kill (SIGKILL)"), |
| 429 | + ("r", "Refresh"), |
| 426 | 430 | ]; |
| 427 | 431 | |
| 428 | 432 | for (key, desc) in bindings { |
| 429 | 433 | if key.is_empty() { |
| 430 | | - y += 8.0; // Spacer |
| 434 | + y += 6.0; // Spacer |
| 431 | 435 | } else { |
| 432 | 436 | self.renderer.text(key, x, y, &key_style)?; |
| 433 | | - self.renderer.text(desc, x + 100.0, y, &desc_style)?; |
| 434 | | - y += 18.0; |
| 437 | + self.renderer.text(desc, desc_x, y, &desc_style)?; |
| 438 | + y += 16.0; |
| 435 | 439 | } |
| 436 | 440 | } |
| 437 | 441 | |