boot/lib/lvgui: Add HorizontalSeparator
@@ -93,6 +93,22 @@ module LVGUI
end
end
+ # Horizontal separator between elements
+ class HorizontalSeparator < Widget
+ def initialize(parent)
+ super(LVGL::LVObject.new(parent))
+ set_width(parent.get_width_fit())
+ set_height(1)
+
+ LVGL::LVStyle::STYLE_PLAIN.dup().tap do |style|
+ style.body_main_color = 0x99BBBBBB
+ style.body_grad_color = style.body_main_color
+ style.body_border_width = 0
+ set_style(style)
+ end
+ end
+ end
+
class Button < Widget
def initialize(parent)
super(LVGL::LVButton.new(parent))
