Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Provide a shared color blend helper in JFace

Đang mở
#4,486 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #4489 của @vogella — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
desktop-dev, frontend

Hướng nghiên cứu

Start with org.eclipse.jface.resource.JFaceColors and the existing private blend copies listed in the issue, such as PopupDialog.blend and Colors.blend. The open question is the ratio type, which the issue leaves undecided, so the design needs maintainer input. A pull request (#4489) is already open against this issue, so check its state and discussion before starting. Done means one public RGB blend in JFaceColors with the public Forms and Workbench versions delegating to it, and no color shift.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Blending two RGB values by a ratio is implemented over a dozen times in platform.ui, each with its own parameter type and rounding:

  • PopupDialog.blend (jface)
  • SWTUtil.mix (jface.databinding)
  • Colors.blend, SourceViewerInformationControl.blend, OverviewRuler.interpolate, DiffPainter.interpolate (jface.text)
  • SourceViewerInformationControl.blend (ui.editors)
  • FormColors.blend, public (ui.forms)
  • ColorUtil.blend, public, ShowViewDialog.blend, HeapStatus.blend (ui.workbench)
  • CTabRendering.blend (e4 renderers)

The two public versions live in Forms and Workbench, so JFace-level code cannot use them.
As more UI derives colors from the theme instead of fixed system colors, this pattern keeps spreading.

Proposal: add a public blend method for RGB to the existing org.eclipse.jface.resource.JFaceColors, which every bundle above already depends on.
FormColors.blend and ColorUtil.blend delegate to it, and the private copies migrate to it.
The ratio type needs to be decided up front: the existing callers use int percent, float and double, and a migration should not shift colors.

Copies in other repositories (Compare in eclipse.platform, JDT UI, PDE) can follow once the API is released.

Ngôn ngữ chính
Java
Star
124
Fork
269
Merge trung bình
2 ngày 5 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.ui

Tất cả issue của eclipse-platform/eclipse.platform.ui

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.