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: Give private spacing helper sources names #10639

Merged
merged 1 commit into from May 12, 2024

Conversation

gxalpha
Copy link
Member

@gxalpha gxalpha commented May 4, 2024

Description

Gives names to the spacing helper label private text sources in the preview, to make the log a bit nicer.

If people think the dstr is overkill (I'm a bit torn on that) I'd also be happy to change it to a generic Preview spacing label instead.

Motivation and Context

When you click on a scene item for the first time in a program run, you get this log:

debug: private source '(null)' (text_ft2_source) created
debug: private source '(null)' (text_ft2_source) created
debug: private source '(null)' (text_ft2_source) created
debug: private source '(null)' (text_ft2_source) created

While this obviously isn't a huge issue I think it's nicer to have debug lines that actually say something, so with this PR you get this:

debug: private source 'Preview spacing label 0' (text_ft2_source) created
debug: private source 'Preview spacing label 1' (text_ft2_source) created
debug: private source 'Preview spacing label 2' (text_ft2_source) created
debug: private source 'Preview spacing label 3' (text_ft2_source) created

How Has This Been Tested?

macOS 14.4.1
Ran OBS, clicked a scene item. Observed the log above.
Also created a normal source called Preview spacing label 0 to be 100% sure that the private source names don't cause collisions.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

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.

Copy link
Collaborator

@Lain-B Lain-B left a comment

Choose a reason for hiding this comment

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

Other than the feedback above I generally approve of this

@gxalpha gxalpha force-pushed the preview-spacing-label-name branch from 287fbeb to 6fbfb48 Compare May 5, 2024 18:36
@norihiro
Copy link
Contributor

norihiro commented May 6, 2024

It looks good to me.

@RytoEX RytoEX added the Enhancement Improvement to existing functionality label May 11, 2024
@RytoEX RytoEX merged commit 67e4853 into obsproject:master May 12, 2024
14 checks passed
@gxalpha gxalpha deleted the preview-spacing-label-name 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
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants