Skip to content

Ask Win32 for the DPI, and give the app icons their alpha back - #2

Merged
wrstt merged 1 commit into
mainfrom
dpi-and-icons
Aug 25, 2026
Merged

wrstt merged 1 commit into
mainfrom
dpi-and-icons

Conversation

@wrstt

@wrstt wrstt commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

Two user-visible fixes, both long-standing rather than new.

The interface has rendered at 1.0 scale since 1.0

The Per-Monitor-V2 switches WinForms needs live in App.config. The release ships one executable with no ConfigurO.exe.config beside it — which is how every user runs it — so Control.DeviceDpi answers 96 on every machine and the whole layout is computed at 100%.

Measured, same binary, only the .config removed:

reports window
with .config dpi=144 scale=1.50 2032 × 69
bare exe (as shipped) dpi=96 scale=1.00 1340 × 46

It was never blurry — the manifest still makes the process PMv2-aware, and the window measured at exactly 1340×860 physical with GetDpiForWindow returning 144. It was simply drawn two-thirds size on a 150% display, which reads as an older, denser build rather than as a bug.

NocturneScale.DpiOf now asks Win32: GetDpiForWindow, falling back to GetDpiForMonitor (8.1) then GetDeviceCaps. The shell already does its own layout and handles WM_DPICHANGED itself, so it only ever needed the number. No config file required, single-exe distribution unchanged.

Verified on the bare exe with nothing beside it: dpi=144 scale=1.50, physical window 2582 × 1550.

80 of 139 app icons were logos in a black box

Flattened onto opaque black with no alpha channel. Invisible against a black page; a hard black square against the app's #232532 cards.

Rather than colour-keying black — which punches holes in any dark part of a mark — alpha is restored by flooding inward from the border, so only black actually connected to the outside is removed. Opera keeps its counter, 7-Zip keeps its grey field, Vivaldi keeps its red tile. The one-pixel fringe where each logo was antialiased against the black is un-premultiplied, so edges stay smooth instead of leaving a dark halo.

before after
opaque black corner ~84 0
no alpha channel 84 5 (square by design)

feed/icons.zip rebuilt the same way tools/build_feed.py packs it — flat, deflated, 139 files.

Checks

  • Builds clean under MSBuild Release, 0 warnings, 0 errors, TreatWarningsAsErrors on.
  • DPI fix verified against the exact shipping configuration (bare exe, no .config).
  • Icons re-audited after the pass: no black-matted icon remains.

Not verified: in-app icon rendering — C:\ProgramData\ConfigurO\Feed\ is written by the elevated app and can't be swapped from a normal session. The feed pulls icons.zip from main, so Refresh links picks it up once this merges.

version.txt untouched; cutting 3.3 is a separate step.

The Per-Monitor-V2 switches WinForms needs are in App.config, and the release
ships one executable with no ConfigurO.exe.config beside it. Run that way,
Control.DeviceDpi answers 96 everywhere, so the interface laid out at 100% and
drew two-thirds size on a scaled display -- crisp, because the manifest still
makes the process PMv2 aware, but small enough to read as an older build.
Present since 1.0. Scale now comes from GetDpiForWindow, with GetDpiForMonitor
and GetDeviceCaps behind it. Verified on the bare exe: 96/1.00 before,
144/1.50 after.

80 of the 139 icons were logos flattened onto opaque black -- invisible on a
black page, a hard black square on a #232532 card. Alpha is restored by
flooding inward from the border, so only black connected to the outside goes
and interior dark survives; the antialiased fringe is un-premultiplied so
edges stay smooth. No black-matted icon is left.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wrstt
wrstt merged commit 831e2c3 into main Aug 25, 2026
1 check passed
@wrstt
wrstt deleted the dpi-and-icons branch August 25, 2026 01:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review


P2 Badge Recompress icons below the documented feed limit

The modified epic.png, sublimemerge.png, and sumatrapdf.png grow from 20,983/30,846/28,838 bytes to 79,030/57,177/85,072 bytes respectively, despite docs/FEED.md:62-65 requiring every feed icon to remain under 50 KB. Because every first load or forced refresh downloads the complete icons.zip, these oversized assets permanently increase catalogue transfer and cache costs; preserve the restored alpha while optimizing these three PNGs back below the stated limit.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant