@@ -468,6 +468,11 @@ impl Renderer { |
| 468 | 468 | self.add_pane_border(pane.x, pane.y, pane.width, pane.height, pane.focused); |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | + // Dim inactive panes with a semi-transparent overlay |
| 472 | + if !pane.focused && panes.len() > 1 { |
| 473 | + self.add_dim_overlay(pane.x, pane.y, pane.width, pane.height); |
| 474 | + } |
| 475 | + |
| 471 | 476 | tracing::trace!( |
| 472 | 477 | "Pane {} at ({}, {}) size {}x{} focused={}", |
| 473 | 478 | i, pane.x, pane.y, pane.width, pane.height, pane.focused |
@@ -557,6 +562,19 @@ impl Renderer { |
| 557 | 562 | 0.0, |
| 558 | 563 | ); |
| 559 | 564 | |
| 565 | + // Active tab accent indicator (colored bar at bottom) |
| 566 | + if tab.is_active { |
| 567 | + let accent_height = 3.0; |
| 568 | + let accent_color = [0.4, 0.6, 1.0, 1.0]; // Blue accent matching focused pane border |
| 569 | + self.add_quad( |
| 570 | + to_ndc_x(tab.rect.x), to_ndc_y(tab.rect.y + tab.rect.height - accent_height), |
| 571 | + to_ndc_x(tab.rect.x + tab.rect.width), to_ndc_y(tab.rect.y + tab.rect.height), |
| 572 | + 0.0, 0.0, 0.0, 0.0, |
| 573 | + accent_color, |
| 574 | + 0.0, |
| 575 | + ); |
| 576 | + } |
| 577 | + |
| 560 | 578 | // Tab title text (render each character using configured color) |
| 561 | 579 | self.render_text_at( |
| 562 | 580 | &tab.title, |
@@ -714,6 +732,11 @@ impl Renderer { |
| 714 | 732 | self.add_pane_border(pane.x, pane.y, pane.width, pane.height, pane.focused); |
| 715 | 733 | } |
| 716 | 734 | |
| 735 | + // Dim inactive panes with a semi-transparent overlay |
| 736 | + if !pane.focused && panes.len() > 1 { |
| 737 | + self.add_dim_overlay(pane.x, pane.y, pane.width, pane.height); |
| 738 | + } |
| 739 | + |
| 717 | 740 | // Show scroll indicator when scrolled back from bottom |
| 718 | 741 | if pane.terminal.is_scrolled() { |
| 719 | 742 | self.add_scroll_indicator(pane.x, pane.y, pane.width, pane.height); |
@@ -831,6 +854,24 @@ impl Renderer { |
| 831 | 854 | ); |
| 832 | 855 | } |
| 833 | 856 | |
| 857 | + /// Add a semi-transparent dark overlay to dim inactive panes |
| 858 | + fn add_dim_overlay(&mut self, x: u32, y: u32, width: u32, height: u32) { |
| 859 | + let (surface_w, surface_h) = self.gpu.size(); |
| 860 | + let to_ndc_x = |px: f32| (px / surface_w as f32) * 2.0 - 1.0; |
| 861 | + let to_ndc_y = |py: f32| 1.0 - (py / surface_h as f32) * 2.0; |
| 862 | + |
| 863 | + // Semi-transparent black overlay to dim the pane |
| 864 | + let dim_color = [0.0, 0.0, 0.0, 0.35]; |
| 865 | + |
| 866 | + self.add_quad( |
| 867 | + to_ndc_x(x as f32), to_ndc_y(y as f32), |
| 868 | + to_ndc_x((x + width) as f32), to_ndc_y((y + height) as f32), |
| 869 | + 0.0, 0.0, 0.0, 0.0, |
| 870 | + dim_color, |
| 871 | + 0.0, |
| 872 | + ); |
| 873 | + } |
| 874 | + |
| 834 | 875 | /// Add a visual indicator when the terminal is scrolled up from the bottom. |
| 835 | 876 | /// Shows a small down arrow or bar at the bottom-right to indicate more content below. |
| 836 | 877 | fn add_scroll_indicator(&mut self, x: u32, y: u32, width: u32, height: u32) { |