[Win32] Support separate header-line and grid-line colors for Table and Tree
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- desktop-dev
Línea de trabajo
The work sits in SWT's Win32 Table and Tree classes: Tree.wmNotifyHeader() draws header separators with COLOR_3DFACE, and Table uses the display-level tableHeaderLinePixel setting. Start by reading how each widget paints its header and body lines, then settle the public API direction with maintainers before writing code. Done would mean per-widget header and grid colors that reset to native behavior and redraw on change, on Windows first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
Table and Tree do not offer a consistent public API for configuring header separator and body grid-line colors. This makes it difficult to provide suitable line colors in dark themes.
The difference is particularly visible on Windows: Tree column header separators are much brighter than the equivalent separators in Table. In the Win32 implementation, Tree.wmNotifyHeader() draws the header separators using COLOR_3DFACE, whereas Table uses the internal display-level tableHeaderLinePixel setting when one is configured. That setting is not a public per-widget API and does not control Table's body grid.
For the body grid, Table uses the native Windows list-view grid, while Tree draws lines using DrawEdge. Neither widget exposes a dedicated public grid-line color setter.
This was investigated with SWT 3.134.0.v20260515-1429. The header difference is also visible in Eclipse IDE.
Describe the solution you'd like
Provide a consistent way to configure the following colors independently for both Table and Tree:
- Header-line color, covering the vertical column-header separators and the horizontal separator below the header.
- Grid-line color, covering horizontal and vertical lines in the body.
Ideally these would be per-widget settings, with the existing native behavior retained when no custom color is set. Resetting a color should restore that behavior, and changing a color should redraw the relevant area. Table's existing internal display-level header-line setting should remain compatible; the precedence between it and a new per-widget setting would need to be defined.
Separate colors would allow grids to be more subtle than header separators, or account for different header and body backgrounds. E4 CSS support would be a separate contribution in Platform UI.
I'd appreciate feedback on the API direction and the cross-platform requirements. Table and Tree have different rendering paths on Windows, so the implementations may need to be developed separately even if the API is consistent.
I’m prepared to work on a PR, starting with the Windows implementation. I only have access to Windows, so I would need help reviewing and visually verifying GTK/macOS behavior. Would a Windows-first contribution be acceptable, or should all platforms be covered together?
Describe alternatives you've considered
Painting grid lines in application code is possible, but it does not address the native header separators. Table's existing internal header-line setting is display-wide and does not provide independent body grid coloring.
A Win32 proof of concept now covers both Table and Tree. It uses temporary per-widget data keys to provide independent header-line and grid-line colors; these are experimental settings, not a proposed public API. For Table, the native grid is disabled when a custom grid color is supplied and replacement lines are drawn during SWT's post-paint stage. The prototype also extends SWT's existing background-painting workaround to suppress Explorer-theme column separators, which otherwise remain visible beside the custom grid lines.
A standalone SWT example displays Tree and Table side by side with the same sample data. The prototype was exercised with selection, column resizing/reordering, horizontal and vertical scrolling, and changing the grid color independently of the header color. With no custom per-widget colors supplied, the patched jar produced an identical screenshot to unmodified SWT in this example.
This demonstrates the Windows rendering approach for both widgets. Public API design, complete regression coverage and GTK/macOS support remain to be discussed.
Additional context
Related: https://github.com/eclipse-platform/eclipse.platform.swt/issues/386. That issue discusses Table's existing internal header-line color setting; Tree does not use it.
Eclipse's Windows dark-theme CSS also explicitly disables Tree/Table grid lines (Bug 567933): https://github.com/eclipse-platform/eclipse.platform.ui/commit/80547958cf77fd84c98725ea2fa981b9d22719ed
This is separate from SWT's color support: applications can override visibility, but still need appropriate line colors. This request does not propose changing Eclipse's default grid visibility.
The proof of concept has only been tested on Windows; GTK/macOS behavior and cross-platform API requirements still need discussion.
Standalone SWT comparison
Both screenshots use the same dark backgrounds, sample data and existing display-wide Table header-line setting. Grid visibility is explicitly enabled; no E4 CSS is involved.
Stock SWT (Tree left, Table right):
Win32 prototype: header lines #60666A and grid lines #414649, configured independently for both widgets:
- Lenguaje dominante
- Java
- Estrellas
- 202
- Forks
- 206
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 102
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-platform/eclipse.platform.swt
-
[Win32] Table tooltip indexes cell font with subitem -1Posiblemente ocupada @fdesbiens la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eclipse-platform/eclipse.platform.swt#3752 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Cocoa] NPE in Text.shouldChangeTextInRange_replacementString when the press-and-hold accent menu inserts textPosiblemente ocupada @Jm6CnDDXBwFTakS la tomó hace 1 día. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
eclipse-platform/eclipse.platform.swt#3819 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-platform/eclipse.platform.swt
Issues similares
-
Good First Issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
hiero-ledger/hiero-sdk-java#3044 ·
Los mantenedores suelen responder en 1 día
-
A second build without clean fails in resources-optimizer-maven-plugin because minified files are minified againPosiblemente ocupada @papegaaij la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
hermes-queue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
chrisalunlloyd2-sudo/mindpalace#337 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[Regression][98.0.0] Android I/flutter logs are automatically folded by FlutterConsoleFoldingAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
flutter/flutter-intellij#9221 ·
Los mantenedores suelen responder en 1 día