Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Make Resources independent of scaling/zoom

オープン
#3,527 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
java
領域
desktop

調査の方向性

Start by reading the existing TextLayout, Font, Control, and GC APIs and the monitor-specific zoom and autoscaling behavior described in the issue. Compare the proposed constructors and determine the resource-lifetime and compatibility implications; done means the API design resolves zoom-related rounding without relying on a resource-level zoom value.

索引モデルが issue の本文から書いたものです。

説明

Currently, Resources like TextLayout or Font have a nativeZoom or zoom value set. This is inconsistent with recent SWT features on Windows of a) monitor-specific zoom (different shells might have different zoom factors) and b) some controls have disabled autoscaling. This causes serious rounding problem like reported in #3461 that can't be worked-around by the SWT user.

IMHO to avoid any zoom-related rounding errors it needs API change to define the Control or GC onto which these resources should work.

Example:

TextLayout textLayout = new TextLayout(gc); // <-- new constructor
textLayout.setFont(font);
textLayout.setText(text);
final Rectangle bounds = textLayout.getBounds();
textLayout.setWidth(bounds.width + widthCorrection);
textLayout.draw(gc, x, y);
textLayout.dispose();

or

TextLayout textLayout = new TextLayout(control); // <-- new constructor
textLayout.setFont(font);
textLayout.setText(text);
final Rectangle bounds = textLayout.getBounds();
textLayout.setWidth(bounds.width + widthCorrection);
textLayout.draw(gc, x, y);
textLayout.dispose();
主要言語
Java
スター
202
フォーク
206
平均マージ
14時間 7分
マージ済み PR(30日)
103

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-platform/eclipse.platform.swt のほかの issue

eclipse-platform/eclipse.platform.swt の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。