Conversation
- Make header labels readable over colored headers by repainting text on top with high-contrast color and badge-aware layout - Add per-column text (foreground) color overrides with context menu controls (black/white/custom/auto) - Add global setting: High-contrast text on colored columns; applies to headers and cells when no explicit text color is set - Add Settings option: Header minimum width (px); apply on Save and on startup - Fix workspace crash: ensure workspace item loads via _open_in_tab so self.tableView is valid before rendering - Config: persist new settings (high_contrast_column_text_enabled, header_min_section_size) and column text color overrides (fg) Also includes minor refactors and safeguards in painting paths.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive column color system for the table view with customizable background colors, text color overrides, and column letter labels. The implementation includes both UI controls for managing colors and the underlying infrastructure to persist and apply these settings across table views.
Key changes:
- Column color system with per-column background and text color overrides
- Excel-style column letters (A, B, C) overlay on headers with toggle option
- Settings UI for managing color preferences, custom palette, and header minimum width
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui.py | Adds settings UI controls, color management logic, and workspace loading fixes |
| custom_widgets.py | Implements column color rendering in headers and cells, context menu color controls |
| config_manager.py | Adds default configuration for column color features |
| config.json | Example configuration with color overrides and new settings |
| column_letters.py | Utility function to convert column indices to Excel-style letters |
| tests/test_column_letters.py | Test coverage for the column letters conversion function |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # --- Frozen Column View Setup --- | ||
| self.frozen_column_view = OverlayTableView(self) | ||
| self.frozen_column_view.setItemDelegate(NoHoverDelegate()) | ||
| self.frozen_column_view.setItemDelegate(NoHoverDelegate(self)) |
There was a problem hiding this comment.
The NoHoverDelegate constructor now expects a parent parameter, but the original instantiation at line 487 in the init method doesn't pass one. This will cause a TypeError since NoHoverDelegate inherits from QStyledItemDelegate which expects a parent parameter.
| # --- Frozen Row View Setup --- | ||
| self.frozen_row_view = OverlayTableView(self) | ||
| self.frozen_row_view.setItemDelegate(NoHoverDelegate()) | ||
| self.frozen_row_view.setItemDelegate(NoHoverDelegate(self)) |
There was a problem hiding this comment.
Similar to the previous comment, this NoHoverDelegate instantiation now passes self as a parent parameter, but this creates an inconsistency with other uses in the codebase and may not be the intended API change.
| # This will set current context, assign self.tableView, and display the data | ||
| self._open_in_tab(target_path, binding, df) |
There was a problem hiding this comment.
The method _open_in_tab is called but may not exist or may not accept these parameters. This could cause an AttributeError at runtime if the method signature doesn't match the expected parameters (target_path, binding, df).
Also includes minor refactors and safeguards in painting paths.