Skip to content

Conversation

mdonatas
Copy link
Contributor

@mdonatas mdonatas commented Apr 5, 2025

Fixes #12303

Proposed changes

  • AutoSize = true for labels
  • Prevent btnRemoteColorReset from blinking out part of a second after being shown

Screenshots

Before

At 200%
image

After

At 200%
image

At 100%
image

Test methodology

  • Manully at 100% and 200% scaling

Test environment(s)

  • Windows 11

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

Thank you

@@ -113,6 +113,9 @@ public FormRemotes(IGitUICommands commands)
// Set the minimum height of the color button to be the same as the reset button
btnRemoteColor.MinimumSize = new Size(DpiUtil.Scale(60), btnRemoteColorReset.Height);

// Prevent btnRemoteColorReset from blinking out soon after form loads
btnRemoteColorReset.Visible = false;
Copy link
Member

Choose a reason for hiding this comment

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

Set in the designer file please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason it wasn't set in a designer is that a few lines above its height is used to set MinimumSize of btnRemoteColor and if it's invisible during component initialization it has a wrong height.

I've changed the MinimumSize calculation of btnRemoteColor to use its own height as this is before index change event happens and this button's props are changed.

@RussKie RussKie added the area: hdpi Issues related to scaling on high DPI label Apr 6, 2025
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

The changes LGTM.

@RussKie RussKie merged commit a2b6805 into gitextensions:master Apr 6, 2025
4 checks passed
@mstv mstv added this to the v5.3 milestone Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: hdpi Issues related to scaling on high DPI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color label is not in its place with higher scaling
3 participants