1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-04 21:18:28 +03:00

lvgui: Add HeaderLabel

This commit is contained in:
Samuel Dionne-Riel 2021-06-16 19:59:43 -04:00
parent 4ee19f9048
commit 8be50b7a6f

View File

@ -0,0 +1,15 @@
class LVGUI::HeaderLabel < LVGUI::Widget
def initialize(parent)
super(LVGL::LVLabel.new(parent))
set_align(LVGL::LABEL_ALIGN::LEFT)
set_long_mode(LVGL::LABEL_LONG::BREAK)
style = get_style(LVGL::LABEL_STYLE::MAIN).dup()
set_style(LVGL::LABEL_STYLE::MAIN, style)
style.text_font = LVGL::Hacks.get_font("fonts/overpass-extrabold.otf", 42)
end
def text=(val)
set_text(val)
end
end