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

Deprecate/remove `is-color-display?`

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

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

Đá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
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
desktop

Hướng nghiên cứu

Kiểm tra các triển khai is-color-display? trong các backend gtk3, cocoa và win32, cùng với các tham chiếu API GUI công khai. Quyết định phạm vi ngừng sử dụng hoặc loại bỏ, sau đó xác minh rằng cả ba backend và API được công khai đều nhất quán phản ánh quyết định đó.

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

Mô tả

The function is-color-display? is useless, in its current form, and I propose that it be deprecated and/or removed.

  • It has separate implementations in all 3 backends (gtk3, cocoa, win32) and all of them simply hardcode a constant: (define (is-color-display?) #t)
  • Modern GUI toolkits don't seem to have a corresponding function for it to easily wrap (perhaps because nearly every display in use today has color), so there's no obvious and simple path to fixing it -- nor does there seem to be any great demand for this functionality
  • Unlike most other per-monitor attributes which have racket/gui accessors, this one doesn't take a #:monitor argument (so you can't answer questions like: "Am I drawing on a monochrome monitor right now?")
  • There's no corresponding event that I can find, so when monitors or settings change, your program won't know (unless you poll, which brings its own set of problems)
  • No Racket program that I've found uses this function, and nobody has ever mentioned that it doesn't do what it claims to do

Even if all the issues here were fixed, it's not clear what its intended use is. Perhaps a program could use this as a hint to distinguish visuals by shape rather than simply color, but given the prevalence of colorblindness, they should always do that, anyway.

The one place where I can imagine such a feature being useful is for printing, as black-and-white printers are still fairly common, but that obviously goes through printer-dc% and dc<%>, not the default monitor, and those interfaces have no such feature, so it can't be used for that.

Ngôn ngữ chính
Racket
Star
68
Fork
83
Merge trung bình
9 ngày 8 giờ
Pull request đã merge (30 ngày)
4

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 racket/gui

Tất cả issue của racket/gui

Issue tương tự

Thêm issue về Desktop Dev

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.