Menu/GoTo: tweak go to page/letter dialog layout (#8056)

2 columns instead of 3, to get larger buttons and
avoid truncation with some translations.
This commit is contained in:
hius07
2021-08-14 22:29:25 +03:00
committed by GitHub
parent 3c597d1d84
commit ef1dea990e
2 changed files with 43 additions and 33 deletions

View File

@@ -7,8 +7,6 @@ local _ = require("gettext")
local T = require("ffi/util").template
local ReaderGoto = InputContainer:new{
goto_menu_title = _("Go to page"),
skim_menu_title = _("Skim document"),
}
function ReaderGoto:init()
@@ -16,15 +14,14 @@ function ReaderGoto:init()
end
function ReaderGoto:addToMainMenu(menu_items)
-- insert goto command to main reader menu
menu_items.go_to = {
text = self.goto_menu_title,
text = _("Go to page"),
callback = function()
self:onShowGotoDialog()
end,
}
menu_items.skim_to = {
text = self.skim_menu_title,
text = _("Skim document"),
callback = function()
self:onShowSkimtoDialog()
end,
@@ -59,14 +56,21 @@ x for an absolute page number
{
{
text = _("Cancel"),
enabled = true,
callback = function()
self:close()
end,
},
{
text = _("Skim"),
enabled = true,
text = _("Go to page"),
is_enter_default = true,
callback = function()
self:gotoPage()
end,
}
},
{
{
text = _("Skim document"),
callback = function()
self:close()
self.skimto = SkimToWidget:new{
@@ -81,12 +85,6 @@ x for an absolute page number
end,
},
{
text = _("Go to page"),
enabled = true,
is_enter_default = true,
callback = function() self:gotoPage() end,
}
},
},
input_type = "number",