From b37ae2d681c49c21c0dfa5a1913258a948f9c002 Mon Sep 17 00:00:00 2001 From: Robert Date: Sun, 19 Nov 2017 09:15:54 +0100 Subject: [PATCH] [UX] Fix bookstatuswidget truncated at the bottom in landscape (#3498) --- frontend/ui/widget/bookstatuswidget.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/ui/widget/bookstatuswidget.lua b/frontend/ui/widget/bookstatuswidget.lua index 31e74ae03..d7503c0d7 100644 --- a/frontend/ui/widget/bookstatuswidget.lua +++ b/frontend/ui/widget/bookstatuswidget.lua @@ -153,9 +153,17 @@ function BookStatusWidget:genHeader(title) } } } + local span_top, span_bottom + if Screen:getScreenMode() == "landscape" then + span_top = VerticalSpan:new{ width = Size.span.horizontal_default } + span_bottom = VerticalSpan:new{ width = Size.span.horizontal_default } + else + span_top = VerticalSpan:new{ width = Size.item.height_default } + span_bottom = VerticalSpan:new{ width = Size.span.vertical_large } + end return VerticalGroup:new{ - VerticalSpan:new{ width = Size.item.height_default }, + span_top, HorizontalGroup:new{ align = "center", padding_span, @@ -166,7 +174,7 @@ function BookStatusWidget:genHeader(title) line_container, padding_span, }, - VerticalSpan:new{ width = Size.span.vertical_large }, + span_bottom, } end