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

Dark Mode under Windows

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞

調査の方向性

まず、言及されているエントリポイント white-on-black-panel-scheme? 周辺の Windows GUI コードをたどり、OS が描画するコントロールがどのように扱われているかを確認します。ドキュメントに記載された Windows のパスにあるレジストリ値 AppsUseLightTheme とその動作を比較します。DrRacket がダークモードを使用しているときに Windows のコントロールが適切に描画されれば完了です。

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

説明

The OS-drawn controls aren't working properly when DrRacket is in dark mode.

This issue was created by culling the specific comments from https://github.com/racket/drracket/issues/235.

@jcolivo wrote

Hello Racket Team,
I appreciate all the hard work on trying to improve the dark mode in DrRacket. Thank you.

Just hoping that you won't forget us Windows users. ;-)
My issues are as pointed out in this thread: https://groups.google.com/forum/#!topic/racket-dev/xYjE9JCe9u0

If there is anything I can do to help (I'm not a programmer, but can certainly help with testing), please let me know.

Have a wonderful weekend!

@alex-hhh wrote

The registry key AppsUseLightTheme in
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize,
will be 1 or missing if applications use the "light" theme and will be 0 if
the applications should use a dark theme.

I verified that AppsUseLightTheme changes to 0 if I select "dark" mode in
my preferences on my Windows 10 machine. The key is missing if "Dark" mode
was never selected on a machine.

white-on-black-panel-scheme? could just look for this key on Windows?

Source:
https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application

@mflatt wrote:

More ideas for dark mode on Windows based on various undocumented flags and functions: mflatt/gui@fd38e76

Last time I looked at this, I concluded that system Win32 control classes like buttons or checkboxes (I forget which, but I think it was buttons) don't support dark mode.

@jcolivo wrote

I found the Windows Registry Key as @default-kramer mentioned above referencing the StackOverflow thread:
https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application

If you want the "Choose your default app mode" setting, I'm pretty sure that I can find it in the Windows registry somewhere. (In fact, this looks like it: https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application) I can try to make a PR for mrlib if this is the desired behavior. I don't have any older versions of Windows handy, so it will likely support Win10 only.

On my system (64 bit Windows 10, latest version), I verified the location of the registry key:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize

This is a screenshot of the key when light theme is chosen. Notice the ApsUseLightTheme value set at 0x00000001 (1)
Light Theme On

This is a screenshot of the key when dark theme is chosen. Notice the ApsUseLightTheme value now set at 0x00000000 (0)
Light Theme Off

Would this feature require Racket code to look for this specific registry key value, or would the code be written at a lower level?

主要言語
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 を短くまとめたダイジェスト。