Skip to content

fix: unify window button sizes and use per-style caption icons - #283

Merged
coldhighsun merged 1 commit into
mainfrom
fix/window-button-icons
Nov 11, 2026
Merged

coldhighsun merged 1 commit into
mainfrom
fix/window-button-icons

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • The close glyph had no font size and fell back to 16, while minimize/maximize used 12, so it looked larger than its neighbours. All window buttons are now 40x40 with 16 icons, matching the sidebar tool buttons.
  • Dialog title bars grow from 40 to 48 (CaptionHeight updated in DialogWindowBase, DiskContentDialog and SpaceUsageDialog) so the round close button no longer touches the top edge. DiskContentDialog's fixed height grows from 480 to 488 to keep its content area unchanged.
  • Caption glyphs and colours now come from the current style: style B uses rounder glyphs (amber / green / red), style C keeps the thin monochrome set. New keys: WindowGlyph* (AppStyle.A/B) and WindowIcon* (B and C palettes).
  • The maximize/restore glyph switch moves from code-behind to a WindowState trigger, so it follows style changes. The close glyph turns white on its red hover state.

Test plan

  • dotnet build (0 warnings, 0 errors)
  • dotnet test tests/ManagedDrive.Tests (2367 passed); PaletteKeysTests now covers the new palette and glyph keys
  • Run the app in styles B and C, light and dark: check the three caption icons, hover/pressed on close, maximize/restore toggle, and switching style live
  • Open a dialog (e.g. Settings) and confirm the close button no longer touches the top edge
  • Open the disk content dialog and confirm its content is not clipped
  • Check that the style B glyphs (E738, E740, E73F, E711) render as intended

The close glyph defaulted to 16 while minimize/maximize used 12, so it
looked larger than its neighbours. All window buttons are now 40x40 with
16 icons, matching the sidebar tool buttons.

Dialog title bars grow from 40 to 48 (and CaptionHeight with them) so the
round close button no longer touches the top edge; DiskContentDialog's
fixed height grows by the same 8 px.

Caption glyphs and colours now come from the current style: style B uses
rounder glyphs in amber/green/red, style C keeps the thin monochrome set.
The maximize/restore glyph switch moves from code-behind into a
WindowState trigger so it follows style changes, and the close glyph turns
white on its red hover. PaletteKeysTests covers the new keys.
@coldhighsun
coldhighsun merged commit eb554dc into main Nov 11, 2026
7 checks passed
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coldhighsun
coldhighsun deleted the fix/window-button-icons branch November 11, 2026 08:35
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