Page MenuHome

Fix T88411: Draw frame node text when label is empty
ClosedPublic

Authored by Leon Schittek (lone_noel) on May 19 2021, 11:28 PM.

Details

Summary

This patch fixes the issue described in T88411, that the text in frame nodes is only shown, when the node has a label. This has been caused by rB8f04ddbbc626, because node_draw_frame_label not only draws the label, but also all the other text. Therefore skipping it, when the label is empty, also skips drawing the other text.
This is fixed by moving the check for the empty label into node_frame_draw_label.

Patch: Frame nodes show text despite not having a label.

Same setup in master:

Test file

Diff Detail

Repository
rB Blender
Branch
fix-T88411-frame-node-text (branched from master)
Build Status
Buildable 16484
Build 16484: arc lint + arc unit

Event Timeline

Leon Schittek (lone_noel) requested review of this revision.May 19 2021, 11:28 PM
Leon Schittek (lone_noel) created this revision.

Hi, thanks for the patch!

By looking at the image of the patch:

We should probably remove the padding on the top when there's no label too. Have you tried that?

I hadn't tested that, but I think it does look nice. If you prefer it without padding, as well, I'll update the patch accordingly.

Here's another comparison with a bit more text:

without paddingwith padding

I think it looks better! No reason to have empty room for the label if there's none. Further tweaking can happen outside of this patch.

Cheers!

  • Remove padding when there's no label.

Ah much better, thanks!

This looks good to me, @Harley Acheson (harley) could you please give your blessings to the code? :D

@Harley Acheson (harley) gentle ping

Ah much better, thanks!

This looks good to me, @Harley Acheson (harley) could you please give your blessings to the code? :D

This revision is now accepted and ready to land.Sep 3 2021, 4:12 PM