[Win] Table without column expands
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- java
- 領域
- desktop, desktop-dev
調査の方向性
Reproduce with the given TableWithoutColumnTest snippet: a VIRTUAL Table with no columns, MeasureItem setting event.width to table.getClientArea().width. On Windows the table shows a horizontal scrollbar and remembers a max width instead of staying client-wide. Start from the Windows Table/TableItem MeasureItem and client-area/scrollbar path in SWT; done when the snippet never shows a horizontal bar and rows shrink with the client area.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
We want to make a column as wide as the visible area (client area) without showing a horizontal scrollbar (just like a list). For that we set the client area's width in the MeasureItem event. However, this causes the table to show a horizontal scrollbar, and the item's width only can grow when resizing the table, but not shrink.
To Reproduce
Using Snippet 271 for inspiration:
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
final class TableWithoutColumnTest {
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.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.FULL_SELECTION);
table.addListener (SWT.SetData, event -> {
final TableItem item = (TableItem) event.item;
final int index = table.indexOf (item);
item.setText ("Item " + index);
});
table.addListener(SWT.MeasureItem, event -> {
event.width = table.getClientArea().width;
});
table.setItemCount(100);
table.setSelection(0);
shell.setSize (200, 200);
shell.open ();
while (!shell.isDisposed()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
Expected behavior
The table should never show a horizontal scrollbar and all rows should be as wide as the client area.
Screenshots
Note the horizontal scrollbar. The table remembers the maximum width + x. (Also note the tiny drawing glitch (gray area in the selected row) when starting the resize.)
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Windows 11 25H2, 175% zoom
- 主要言語
- Java
- スター
- 202
- フォーク
- 206
- 平均マージ
- 16時間 56分
- マージ済み PR(30日)
- 110
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-platform/eclipse.platform.swt のほかの issue
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`対応中かも @GreenFuze が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
eclipse-platform/eclipse.platform.swt#3665 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
eclipse-platform/eclipse.platform.swt#3336 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
メンテナーはふだん 1 日以内に返信
eclipse-platform/eclipse.platform.swt の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/rocketmq-dashboard#6872 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ADORSYS-GIS/token-status-link#168 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ADORSYS-GIS/keycloak-oid4vp-plugin#232 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
devops-thiago/ThrillhouseBot#1132 ·
メンテナーはふだん 1 日以内に返信