Page MenuHome

Bug fix for Active area for node-hider arrow too big and overlaps node input
ClosedPublic

Authored by EitanSomething on Feb 28 2019, 6:23 AM.

Details

Summary

Fixes issues where the node-hider arrow overlaps the node input dots that are in close proximity when the node is in hidden mode.The node-hider arrows hit box has been scaled down and moved to the right.

Before


After

Diff Detail

Repository
rB Blender

Event Timeline

EitanSomething created this revision.Feb 28 2019, 6:23 AM
EitanSomething edited the summary of this revision. (Show Details)Feb 28 2019, 3:52 PM

Is it necessary to change the size of the arrow (but_size) ? Wouldn't the problem be solved just by moving it to the right slightly?

@Harley Acheson (harley) probably that is fine too. Do you want to take a look at it?

probably that is fine too. Do you want to take a look at it?

I really wasn't trying to snipe this from @EitanSomething. It was just my gut feeling that this needed a nudge to the right only when closed, so wondered about the size change. But I haven't really looked at that code so I might be missing some important detail.

However, I can look at on the weekend if need be.

The main issue is the fact that the hit targets overlap. The arrow seems as if it is nudged too far to the left away from the header text. Probably it can be fixed also by just moving the arrow over a bit.

There were a couple issues with this open/close button and I addressed them on this patch:

https://developer.blender.org/D4431

Arrow is now moved to the right and is aligned with the location of the arrow in visible mode

Looks good to me, but now I'm a bit confused with two solutions. @Harley Acheson (harley) is yours notably different to this?

@EitanSomething There is one thing that you have missed that will explain everything...

If you take a look at the section of code when it is open you will see that the hit area (basically empty button) and the drawn arrow are placed in a way that includes U.widget_unit.

U.widget_unit is scaled up as you scale the interface up. In a nutshell it is "20" when you have the interface at "1X" scale, and 40 when at "2X"

Unfortunately the code that you are changing does not use that value. So no matter what value you put in that section the button and hitarea will slide to the left as the scale is increased.

If you take a look at the following it will probably make sense:

https://developer.blender.org/D4431

@EitanSomething There is one thing that you have missed that will explain everything...

If you take a look at the section of code when it is open you will see that the hit area (basically empty button) and the drawn arrow are placed in a way that includes U.widget_unit.

U.widget_unit is scaled up as you scale the interface up. In a nutshell it is "20" when you have the interface at "1X" scale, and 40 when at "2X"

Unfortunately the code that you are changing does not use that value. So no matter what value you put in that section the button and hitarea will slide to the left as the scale is increased.

If you take a look at the following it will probably make sense:

https://developer.blender.org/D4431

I can't seem to replicate the hitbox moving moving to the left. Can you share a video of this phenomenon.

@EitanSomething There is one thing that you have missed that will explain everything...

If you take a look at the section of code when it is open you will see that the hit area (basically empty button) and the drawn arrow are placed in a way that includes U.widget_unit.

U.widget_unit is scaled up as you scale the interface up. In a nutshell it is "20" when you have the interface at "1X" scale, and 40 when at "2X"

Unfortunately the code that you are changing does not use that value. So no matter what value you put in that section the button and hitarea will slide to the left as the scale is increased.

If you take a look at the following it will probably make sense:

https://developer.blender.org/D4431

The node area overlaps in the corner of the material output node, volume scatter, etc when using https://developer.blender.org/D4431

Can you share a video of this phenomenon.

Image shown below. As mentioned, If you don't scale values using U.widget_unit then a *constant* like
the "30.0f" will not scale as the interface is scale. Keep in mind I am talking about going to Preferences /
Interface / Resolution scale. It isn't quite the same as doing it in the area itself (ctrl-mouse) and so
you have to test in both.

But again, just scale it using U.widget_unit as you can see in my example, then move things around until
you are happy,

Left is scale 1X, right is 3X. Notice how text scale up and stays in same relative position, while the arrow
scales up but moves left.

Modification of https://developer.blender.org/D4431
Small number changes to the node hider arrow in hidden mode to align to the same position as visible mode. Reduced the button size so that it no longer overlaps the dots on the small nodes with three dots on the left(Material Output,etc). Tested at different UI scale and zoom.
Before:


After:

Works awesome!

I'd say they should take this one. I just abandoned mine.

Cheers, Harley

Works awesome!

I'd say they should take this one. I just abandoned mine.

Cheers, Harley

Almost fully satisfied.
I will continue to fine tune it until its perfect.

@EitanSomething Seems good. Say when you consider this patch done, then we can review.

Cheers

This revision is now accepted and ready to land.Mar 1 2019, 10:07 AM

@EitanSomething Seems good. Say when you consider this patch done, then we can review.

Cheers

Consider the patch done

This revision was automatically updated to reflect the committed changes.