[GTK] Table.getClientArea reports incorrect values
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start at the GTK3 implementation of Table.getClientArea() and compare how it calculates the rectangle with the behavior on Windows. Run the supplied snippet on Linux and Windows to reproduce the difference. Done means the reported rectangle has consistent bounds across the supported platforms.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The Table.getClientArea() method reports incorrect data on GTK3. The x position is wrong by one pixel and the height by approximately the table header.
To Reproduce
Launch this snippet on Windows 11 and Linux (for comparison).
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class PaintOverTable {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final Table table = new Table(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
final TableColumn column = new TableColumn(table, SWT.LEFT);
column.setText("Column");
column.setWidth(100);
table.setHeaderVisible(true);
table.addListener(SWT.Paint, event -> {
final Rectangle clientArea = table.getClientArea();
event.gc.drawRectangle(clientArea);
});
shell.setSize(400, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
On Linux the right and lower lines are visible.
Expected behavior
The reported rectangle should cover the same area on all supported platforms.
Screenshots
Windows 11:
This is reasonable, because the table header draws over the upper part and the lower and right lines are one pixel outside the visible area.
Ubuntu 26.04 (Wayland):
Notice the left line is invisible, but the right one. And the lower line is largely off by approximately the table header height.
Note, this bug is not about painting. I just used this example to illustrate the incorrect values visually.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
- Lenguaje dominante
- Java
- Estrellas
- 202
- Forks
- 206
- Merge medio
- 20 h 20 min
- PR fusionados (30 d)
- 113
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
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Posiblemente ocupada @GreenFuze la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 comentarios ·
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
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-platform/eclipse.platform.swt
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenIntegrationEngine/engine#496 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SasanLabs/VulnerableApp#836 ·
Los mantenedores suelen responder en 1 día
-
enhancement frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Albertinesilva/backend-engineering-journey-java-springboot#46 ·
-
Snyk: vulnerabilities in jackson-databind 2.21.5Posiblemente ocupada @harrywu23 la tomó hoy. Abiertobug
Dificultad 1/5 1-3 horas Aptitud para principiantes 80/100
SOFTENG-310-Group-4/Project-A1-310-Group-4#115 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
carlos-emr/carlos#4833 · 1 comentario ·
Los mantenedores suelen responder en 1 día