mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #192 from giorgio130/master
Fixes for higher DPI; make the X easier to reach.
This commit is contained in:
@@ -65,8 +65,8 @@ MenuCloseButton = InputContainer:new{
|
||||
|
||||
function MenuCloseButton:init()
|
||||
self[1] = TextWidget:new{
|
||||
text = "-[ X ]- ",
|
||||
face = Font:getFace("cfont", 22),
|
||||
text = " X ",
|
||||
face = Font:getFace("cfont", 42),
|
||||
}
|
||||
|
||||
local text_size = self[1]:getSize()
|
||||
@@ -247,13 +247,13 @@ Menu = FocusManager:new{
|
||||
function Menu:_recalculateDimen()
|
||||
self.dimen.w = self.width
|
||||
-- if height not given, dynamically calculate it
|
||||
self.dimen.h = self.height or (#self.item_table + 2) * 36
|
||||
self.dimen.h = self.height or (#self.item_table + 2) * Screen:scaleByDPI(36)
|
||||
if self.dimen.h > Screen:getHeight() then
|
||||
self.dimen.h = Screen:getHeight()
|
||||
end
|
||||
self.item_dimen = Geom:new{
|
||||
w = self.dimen.w,
|
||||
h = 36, -- hardcoded for now
|
||||
h = Screen:scaleByDPI(36), -- hardcoded for now
|
||||
}
|
||||
if not self.is_borderless then
|
||||
-- we need to substract border, margin and padding
|
||||
|
||||
Reference in New Issue
Block a user