Skip to content

fix(screenshot): scale HUD & selection label for HiDPI displays - #3308

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
hthienloc:fix/screenshot-hud-scale
Sep 5, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
hthienloc:fix/screenshot-hud-scale

Conversation

@hthienloc

Copy link
Copy Markdown
Member

No description provided.

@hthienloc

Copy link
Copy Markdown
Member Author

/claude review

@claude

claude Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: scale=1 output is byte-identical to the old code (hudItem.width(step) matches the old len(key)*(charW+1) + (1+len(desc))*(charW+1), and label/drawLabel offsets collapse to the old 4/2/8); HUD text fits the pill exactly since hudW = totalW + 2*padding and the per-item advance equals what is drawn; labelRect padding matches drawLabel's l.x1+4*scale/l.y1+2*scale; drawChar's new nested loops keep the per-pixel bufW/bufH/len(data) guards; scaleFactor floors at 1 so a zero-valued overlay.scaleX is safe; os.output.fractionalScale is set from screenBuf.Width/logicalW in captureForSurface before the first redrawSurface, so effectiveScale() agrees with the label's bounds.scaleX and never falls through to the hyprctl subprocess path during rendering; hudDimensions is not used for input hit-testing, so the larger pill cannot desync clicks. Model: claude-opus-5.

@bbedward
bbedward merged commit 5f124de into duxlabs-dev:master Sep 5, 2026
3 checks passed
dank-shell-app Bot pushed a commit that referenced this pull request Sep 5, 2026
@hthienloc
hthienloc deleted the fix/screenshot-hud-scale branch November 15, 2026 15:38
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.

2 participants