separator
Widget for making thin lines to visually separate other widgets. Use .min_size_content to control size. Good for horizontal rule (or vertical).
Only valid between Window.beginand Window.end.
Parameters
- src:std.builtin.SourceLocation
- std.builtin.SourceLocation
- opts:Options
- Options
Source
Implementation
pub fn separator(src: std.builtin.SourceLocation, opts: Options) WidgetData {
const defaults: Options = .{
.name = "Separator",
.background = true, // TODO: remove this when border and background are no longer coupled
.color_fill = dvui.themeGet().border,
.min_size_content = .{ .w = 1, .h = 1 },
};
var wd = WidgetData.init(src, .{}, defaults.override(opts));
wd.register();
wd.borderAndBackground(.{});
wd.minSizeSetAndRefresh();
wd.minSizeReportToParent();
return wd;
}