Skip to content

Windows tray menu text is blurry on HiDPI displays and ignores OS theme #21

Description

@halr9000

The Windows tray's context menu text (e.g. "Token Meter", "$0.31 est | 732.8K tokens", "Guidance: ...") renders blurry on a HiDPI display, and stays light-themed regardless of the Windows dark mode setting. (Note: all modern displays are HDPI, so this impacts all Windows users. Unless they are using an old CRT 😁 .)

Screenshot:

Image

Contrast to Windows sound options right-click

Image

And ChatGPT:

Image

scripts/run-tray.ps1 builds the NotifyIcon/ContextMenuStrip (lines 409-470) in a process launched via powershell.exe (Windows PowerShell 5.1 / .NET Framework WinForms) with no DPI-awareness manifest declared. Without one, Windows applies system-DPI bitmap scaling to the whole process, which blurs the menu text. The menu also doesn't read HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme, so it can't follow the OS light/dark setting.

Environment

  • Windows 11 Pro, build 10.0.26200
  • Token Meter revision 0361558 (main, 2026-08-14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions