mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-11 12:05:26 +03:00
boot/splash: Handle big BGRT
This commit is contained in:
parent
be67fcb8b4
commit
4f75d3ef5a
@ -104,17 +104,20 @@ class UI
|
|||||||
# as per the spec, but in practice many have centered BGRTs.
|
# as per the spec, but in practice many have centered BGRTs.
|
||||||
# So we try to guesstimate a centered BGRT here.
|
# So we try to guesstimate a centered BGRT here.
|
||||||
midpoint = @screen.get_height/2
|
midpoint = @screen.get_height/2
|
||||||
|
bottom_third = @screen.get_height() / 3.0 * 2
|
||||||
logo_bottom = @logo.get_height() + @logo.get_y()
|
logo_bottom = @logo.get_height() + @logo.get_y()
|
||||||
@vertical_offset = logo_bottom - midpoint + 5*@unit
|
@vertical_offset = logo_bottom - midpoint + 5*@unit
|
||||||
@vertical_offset = 0 if @vertical_offset < 0
|
@vertical_offset = 0 if @vertical_offset < 0
|
||||||
|
|
||||||
# TODO: support "big" or "fullscreen" BGRTs
|
|
||||||
# -> when they dip into the 1/3rd area?
|
|
||||||
# Some vendors ship a full-screen BGRT.
|
# Some vendors ship a full-screen BGRT.
|
||||||
# Since we can't do much about it, we're assuming this:
|
# Since we can't do much about it, we're assuming this:
|
||||||
# - Has a centered logo
|
# - Has a centered logo
|
||||||
# - The bottom third of the display is free
|
# - The bottom third of the display is free
|
||||||
# This assumption should hold since this is the assumptions for Windows.
|
# This assumption should hold since this is the assumptions for Windows.
|
||||||
|
if (@vertical_offset + midpoint) > bottom_third
|
||||||
|
# Force the UI area to be at the last third at the bottom.
|
||||||
|
@vertical_offset = bottom_third - midpoint + 5*@unit
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_progress_bar()
|
def add_progress_bar()
|
||||||
|
Loading…
Reference in New Issue
Block a user