[GTK] Table.getClientArea reports incorrect values
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 202
- Fork
- 206
- Merge medio
- 16h 56m
- PR unite (30g)
- 110
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 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 *`Forse già presa @GreenFuze l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-platform/eclipse.platform.swt
Issue simili
-
agent-java community triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elastic/apm-agent-java#4594 ·
I maintainer di solito rispondono entro 1 giorno
-
area/plugin good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kestra-io/plugin-soda#137 ·
-
area/plugin good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
kestra-io/plugin-aws#816 ·
I maintainer di solito rispondono entro 2 giorni
-
area/plugin good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kestra-io/plugin-kestra#200 ·
I maintainer di solito rispondono entro 1 giorno
-
bug untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
opensearch-project/search-relevance#618 ·
I maintainer di solito rispondono entro 3 giorni