mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix focus/unfocus in MultiInputDialog (#4060)
Also fix size of window DCREREADER_CONFIG_FONT_SIZE in Advanced settings
This commit is contained in:
@@ -173,6 +173,8 @@ function SetDefaults:init()
|
||||
table.insert(fields, {
|
||||
text = tostring(k) .. " = " .. tostring(v),
|
||||
hint = "",
|
||||
padding = Screen:scaleBySize(2),
|
||||
margin = Screen:scaleBySize(2),
|
||||
})
|
||||
end
|
||||
self.set_dialog = MultiInputDialog:new{
|
||||
|
||||
@@ -47,6 +47,8 @@ function MultiInputDialog:init()
|
||||
focused = k == 1 and true or false,
|
||||
scroll = false,
|
||||
parent = self,
|
||||
padding = field.padding or nil,
|
||||
margin = field.margin or nil,
|
||||
}
|
||||
if Device:hasKeys() then
|
||||
--little hack to piggyback on the layout of the button_table to handle the new InputText
|
||||
@@ -134,6 +136,9 @@ function MultiInputDialog:onSwitchFocus(inputbox)
|
||||
-- unfocus current inputbox
|
||||
self._input_widget:unfocus()
|
||||
self._input_widget:onCloseKeyboard()
|
||||
UIManager:setDirty(nil, function()
|
||||
return "ui", self.dialog_frame.dimen
|
||||
end)
|
||||
|
||||
-- focus new inputbox
|
||||
self._input_widget = inputbox
|
||||
|
||||
Reference in New Issue
Block a user