1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-09-11 03:55:23 +03:00

boot/error: Use assets path

This commit is contained in:
Samuel Dionne-Riel 2021-06-13 17:28:34 -04:00
parent 87ac4c8813
commit 61ebf3d2f4

View File

@ -14,7 +14,7 @@ $color = $color.rjust(6, "0").rjust(8, "F").to_i(16)
class UI
# As this is not using BaseWindow, LVGUI::init isn't handled for us.
LVGUI.init()
LVGUI.init(assets_path: "boot-error/assets")
def initialize()
add_screen
@ -108,13 +108,8 @@ class UI
# Title elements
def add_sad_phone()
file = nil
file = "/sad.svg" if File.exist?("/sad.svg")
file = "sad.svg" if File.exist?("sad.svg")
return unless file
@sad_phone = LVGL::LVImage.new(@screen)
@sad_phone.set_src("#{file}?height=#{@title_bar.get_height - 2 * padding}")
@sad_phone.set_src("#{LVGL::Hacks.get_asset_path("sad.svg")}?height=#{@title_bar.get_height - 2 * padding}")
@sad_phone.set_pos(2 * padding, padding)
end