Skip to content

fix(gui): centre the Detect GPU icon; restart as administrator from the sidebar - #80

Open
Rovey wants to merge 1 commit into
mainfrom
fix/gui-icon-centre-admin-link
Open

Rovey wants to merge 1 commit into
mainfrom
fix/gui-icon-centre-admin-link

Conversation

@Rovey

@Rovey Rovey commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What

  • Detect GPU icon (Dashboard, top right) centred. The button placed the glyph by its advance, and the merged icon font moves glyphs down (GlyphOffset.y = 3), so the icon sat right of and below the middle. The new helper icon_button draws it by the glyph's own outline, through icon_centred. That is the code the profile badges already used, moved from ui_optimize.cpp to ui_widgets.cpp, so the badges are unchanged. The icon keeps the size it had.
  • "Not administrator" in the sidebar is clickable. It shows a hand cursor and a tooltip, and a click calls restart_elevated, the same action as the Dashboard's Restart as administrator button. When the app is elevated, the line is plain text as before.

The owner asked for both after looking at the 0.4.9 window.

Checked

  • cmake --workflow --preset ci: builds with /W4 /WX, and core_tests and app_tests pass.
  • Checked on screen with this build started with --demo=run and without administrator rights, on the RTX 5070 PC at 150 %:
    • the icon has equal margins in its button (about 40/35 px at 4x zoom; the arrow makes the glyph slightly uneven);
    • "Not administrator" shows the tooltip on hover.
  • The click itself (UAC prompt, then an elevated copy) was not tried. It is the same restart_elevated(std::nullopt) as the Dashboard button, which was tested in Release checklist: hardware checks before 0.4.9 #69.

🤖 Generated with Claude Code

…om the sidebar

The refresh icon on the Dashboard was placed by its advance, and the merged
icon font moves its glyphs down (GlyphOffset), so it sat right of and below
the middle of its button. It is now drawn by its own outline, with the
helper the profile badges already used (icon_centred), at the size it had.

Without administrator rights, "Not administrator" in the sidebar is a link
that restarts the app elevated, as the Dashboard's button does; its tooltip
says what needs the rights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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