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

UI: Center preview spacing lines #10643

Merged
merged 1 commit into from May 12, 2024

Conversation

gxalpha
Copy link
Member

@gxalpha gxalpha commented May 5, 2024

Description

Currently, the spacing lines begin in the middle of the box and then are their width wide towards one direction. This means that the larger they are, the more off-center their middle is.
This commit changes them to start at half their width left/top of the center and end half the width to the right/bottom of the center, putting the middle in the center.

Before/After:

Before/After with the width increased 10x for bigger effect:

Motivation and Context

This bothered me for a long time.

How Has This Been Tested?

macOS 14.4.1
See screenshots above.
Also checked for lines wiggling. It appears to be the same behavior as before.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Currently, the spacing lines begin in the middle of the box and then are
their width wide towards one direction. This means that the larger they
are, the more off-center their middle is.
This commit changes them to start at half their width left/top of the
center and end half the width to the right/bottom of the center, putting
the middle in the center.
@gxalpha gxalpha added Bug Fix Non-breaking change which fixes an issue UI/UX Anything to do with changes or additions to UI/UX elements. labels May 5, 2024
@Warchamp7
Copy link
Member

Can someone verify nothing weird happens here with rotated scene items? Otherwise looks good.

Copy link
Member

@GeorgesStavracas GeorgesStavracas left a comment

Choose a reason for hiding this comment

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

Needs code review but in principle it's fine

@gxalpha
Copy link
Member Author

gxalpha commented May 6, 2024

Can someone verify nothing weird happens here with rotated scene items? Otherwise looks good.

@Warchamp7 works fine with rotated items:
image

@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone May 12, 2024
@RytoEX RytoEX merged commit 4165047 into obsproject:master May 12, 2024
14 checks passed
@gxalpha gxalpha deleted the distance-helpers-center branch May 12, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants