vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
36 stars 14 forks source link

Style Setters Overview #50

Open antongit opened 2 years ago

antongit commented 2 years ago

Style Setter TODO (wip):

antongit commented 2 years ago

Button

Button itself has no padding, but it listens to the FramePadding style. It would be cool if the SetButtonStyle node has also the Padding pin, internally it will set FramePadding. But... maybe it is a bit strange, when someone sets padding in SetButtonStyle and somewhere above not only buttons, but other frames will get padding as well?

At the moment one should use two Set nodes to define how buttons should look like:

image

And to control the text color of the button, the third node SetTextStyle should be used.

Slider

An example of Slider that needs 4 nodes to style. image

Scroll

Style for the scrollbar is very self contained, but an extra SetGrabStyle can set Min Size (min vertical size in this case).

image

Window

It looks like, that SetTitleStyle and SetResizeGripStyle can be part of the SetWindowStyle as they are affecting only windows, but then SetWindowStyle will be huge...

image

azeno commented 2 years ago

Well of course those properties should be independent. If they aren't we shouldn't pack them in one group. Better to put many nodes there and it makes sense in the end than to have convenience nodes making promises they can't fulfill.

antongit commented 2 years ago

@azeno

Better to put many nodes there and it makes sense in the end than to have convenience nodes making promises they can't fulfill.

Ähm, probably there is a misunderstanding here. I meant the other way around. What I meant is to have some convenient Node SetAllButtonPropertiesStyle (whatevername), that has pins of SetButtonStyle AND also some (relevant) pins from the SetFrameStyle. So only one node is needed to style buttons. The downside is that this SetAllButtonPropertiesStyle changes not only buttons, but all Frames upstream.

joreg commented 2 years ago

"The downside is that this SetAllButtonPropertiesStyle changes not only buttons, but all Frames upstream." exactly i think this is a no-go.

antongit commented 2 years ago

Missing in VL.ImGui. For now:

Values

Colors

Not Working

Missing in ImGuiNET

Values