Open antongit opened 2 years ago
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:
And to control the text color of the button, the third node SetTextStyle
should be used.
An example of Slider that needs 4 nodes to style.
Style for the scrollbar is very self contained, but an extra SetGrabStyle can set Min Size (min vertical size in this case).
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...
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.
@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.
"The downside is that this SetAllButtonPropertiesStyle changes not only buttons, but all Frames upstream." exactly i think this is a no-go.
Style Setter TODO (wip):
[x] SetCheckboxStyle Checkmark
[x] SetPlotStyle Line LineHovered Histogram HistogramHovered
[x] SetAlphaStyle Alpha DisabledAlpha
[x] SetWindowStyle Padding Rounding BorderSize MinSize TitleAlign WindowBg (Color) MenuBarBg (Color) Joined from SetTitleStyle: TitleBackgroundColor TitleActiveColor TitleCollapsedColor Joined from SetResizeGrip: ResizeGripColor ResizeGripHovered ResizeGripActive
[x] SetBorderStyle Border (Color) Shadow (Color)
[x] SetChildStyle Rounding BoderSize ChildBg (Color)
[x] SetPopupStyle Rounding BorderSize PopupBg Modal Dim Background (ModalWindowDimBg)
[x] SetFrameStyle Padding Rounding BorderSize FrameBg (Color) FrameBgHovered (Color) FrameBgActive (Color)
[x] SetSpacingStyle Item Spacing Item InnerSpacing
[x] SetIndentStyle Spacing
[x] SetTableStyle Cell Padding TableHeaderBg TableBoderStrong TableBorderLight TableRowBg TableRowBgAlt
[x] SetTabStyle TabRounding Tab TabHovered TabActve TabUnfocused TabUnfocusedActive
[x] SetButtonStyle ButtonTextAlign Button ButtonHovered ButtonActive
[x] SetGrabStyle GrabMinSize GrabRounding
[x] SetScrollStyle ScrollbarSize ScrollbarRounding ScrollbarBg ScrollbarGrab ScrollbarGrabHovered ScrollbarGarbActive
[x] SetSliderStyle SliderGrab SliderGrabActive
[x] SetHeaderStyle - added Tags: Selectable CollapsingHeader TreeNode MenuItem ??? Header HeaderHovered HeaderActive
[x] SetSeparatorStyle Separator SeparatorHovered SeparatorActive
[x] SetSelectableStyle TextAlign
[x] SetTextStyle Color (ImGuiCol_Text) Disabled Color (ImGuiCol_TextDisabled) Selected Text Background (ImGuiCol SelectedTextBackground)