Skip to content

Conversation

@apman
Copy link
Contributor

@apman apman commented Dec 20, 2025

This fixes a number of inconsistencies across MacOS controls in how they respond to explicit height settings.

image image

Before: some controls did not respond at all, some grew to the set size but lost their margins, potentially leading to focus highlight being cut off, some grew overall to the requested size leaving room for the margins (so the visible size is 3px less)

After: I have now taken the latter approach for all controls.

While it might seem slightly confusing that a "30px" control has a visible height of 27px, it guarantees that the control is self-contained and won't visually bleed over other controls or get clipped unexpectedly.

Consumers will need to account for the margin (e.g. set Height="33" to achieve 30 for the unfocussed visual appearance), or don't set a height at all and let the theme dictate the natural size (which is usually the best practice).

@apman apman force-pushed the MacOS/inconsistent-fixed-height-behaviour branch from 704e2c7 to 2b4439e Compare December 20, 2025 05:25
@apman apman force-pushed the MacOS/inconsistent-fixed-height-behaviour branch from 2b4439e to 909f349 Compare December 20, 2025 07:29
@apman apman force-pushed the MacOS/inconsistent-fixed-height-behaviour branch from fc6834a to bb5336b Compare January 5, 2026 21:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses inconsistent behavior across MacOS controls when custom heights are set. The fix ensures all controls grow to the requested size while reserving 3px margins for focus highlights, preventing visual clipping or bleeding. The approach standardizes the behavior so controls maintain self-contained rendering with proper focus border spacing.

Key changes:

  • Removed explicit height bindings from internal border elements in TextBox and TagInput controls
  • Changed margin resource references from StaticResource to DynamicResource for consistency
  • Added explicit height binding to NumericUpDown's inner TextBox
  • Updated MultiComboBox horizontal alignment to Stretch for better layout behavior

Reviewed changes

Copilot reviewed 16 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TextBox.axaml Removed Height bindings from internal borders and changed margin to DynamicResource
TagInput.axaml Removed Height binding from border and updated margin resource reference
RadioButton.axaml Changed margin resource reference to DynamicResource
NumericUpDown.axaml Added Height binding to PART_TextBox for consistency
MultiComboBox.axaml Changed HorizontalAlignment to Stretch and margin to DynamicResource
Devolutions.AvaloniaTheme.MacOS.csproj Updated release notes and cleaned up XML formatting
Visual test baselines Updated PNG screenshots to reflect new control rendering behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@apman apman marked this pull request as ready for review January 8, 2026 19:34
@apman apman merged commit 2edf2bf into master Jan 8, 2026
6 checks passed
@apman apman deleted the MacOS/inconsistent-fixed-height-behaviour branch January 8, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants