Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Connect Signal Dialog control alignment #96164

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

Giganzo
Copy link
Contributor

@Giganzo Giganzo commented Aug 27, 2024

Fixes: #96163

First problem

First problem was that CheckButton and CheckBox didn't have same height.
To solve this I changed CheckBox to use same stylebox as CheckButton, as it uses same margins as Button.
Do you think this is the correct way or should CheckButton height be same as the current CheckBox, or add a style override for this dialog to the CheckBox?

Second problem

Problem two was that LineEdit changed height in some situations.
Believe it has to do if it had a Button in same row or not (This was true in other places too, if it has no "partner" height is 29 else 30).

Example:
image
image

To fix this I removed -1 from LineEdit and TextEdit top margin.

// The original button_style style has an extra 1 pixel offset that makes LineEdits not align with Buttons,
// so this compensates for that.

Could not find any problems in other places after removing the -1 from top margin (maybe something has changed since then?), appreciate if anyone else can take a look too. There was however an extra +1 to the top margin of from_signal (top left LineEdit) in the connect signal dialog that made it 1px to big after removing -1 from the theme. So the +1 was also removed.

Result

Before:
csd_sizes

After:
csd_after

Compact

Before:
csd_compact_before

After:
csd_compact_after

@Giganzo Giganzo requested review from a team as code owners August 27, 2024 12:16
@Mickeon Mickeon requested a review from KoBeWi August 27, 2024 12:57
@Mickeon Mickeon added this to the 4.4 milestone Aug 27, 2024
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

I'm not sure what the removed styles were for, I don't see any problems after removing them.
The dialog's override was added in #60478. It was supposed to align the top LineEdits, but doesn't seem necessary anymore.

@akien-mga akien-mga merged commit 466b4b9 into godotengine:master Sep 8, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@Giganzo Giganzo deleted the signal-dialog-align-fix branch September 13, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connect signal dialog controls not aligned
4 participants