Function zng::widget::foreground
source ยท pub fn foreground(child: impl UiNode, foreground: impl UiNode) -> impl UiNode
Expand description
P
Custom foreground fill. Allows using any other UI node as a foreground overlay.
The foreground
is not interactive and not hit-testable.
The foreground is layout to fill the widget, it does not affect the size of the widget. It is rendered over
the widget child and background, it is rendered under borders by default.
Note that nodes can only exist in a single place in the UI tree at a time, so if you set this property in a style
the foreground node will only appear in the last widget that uses the style, the foreground_fn
property does not have this issue.