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

Deprecate/remove `is-color-display?`

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
領域
desktop

調査の方向性

gtk3、cocoa、win32バックエンドの is-color-display? の実装と、公開GUI APIの参照を調査してください。非推奨化または削除の範囲を決定し、そのうえで3つすべてのバックエンドと公開APIがその決定を一貫して反映していることを確認してください。

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

説明

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.

主要言語
Racket
スター
68
フォーク
83
平均マージ
9日 8時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

racket/gui のほかの issue

racket/gui の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

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

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