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

Disable certain properties when not needed #22603

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XiaoMigros
Copy link
Contributor

This PR disables the Text Offset option for text in line elements when there is no text to be offset. Additionally, the 'Gap between text and line' option is disabled when there is no text to leave a gap between.

image

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@XiaoMigros XiaoMigros changed the title Disable properties when not needed Disable certain properties when not needed Apr 27, 2024
@zacjansheski
Copy link
Contributor

Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved

m_beginningTextOffset->setIsEnabled(hasBeginText);
m_continuousTextOffset->setIsEnabled(hasContinueText);
m_endTextOffset->setIsEnabled(hasEndText);
m_gapBetweenTextAndLine->setIsEnabled(isLineAvailable && (hasBeginText || hasContinueText));
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that #22602 has been merged:

Suggested change
m_gapBetweenTextAndLine->setIsEnabled(isLineAvailable && (hasBeginText || hasContinueText));
m_gapBetweenTextAndLine->setIsEnabled(isLineAvailable && (hasBeginText || hasContinueText || hasEndText));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should that component visually be moved as well, maybe to the top or bottom of the text section? Up until now it made sense to keep it between begin and continue text because it only affected them, but now it affects all text types...

Copy link
Contributor

Choose a reason for hiding this comment

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

I had forwarded the question above to @bkunda on Slack, but unless I missed something I hadn't heard back yet. I think it's indeed good to move this property but the question is of course where.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants