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:
parent
4ee19f9048
commit
8be50b7a6f
15
boot/lib/lvgui/lvgui/header_label.rb
Normal file
15
boot/lib/lvgui/lvgui/header_label.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user