mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Numberpicker: show hint with boundaries instead of the current value (#7529)
* Numberpicker: show hint with boundaries * Show current value in the hint
This commit is contained in:
@@ -126,7 +126,7 @@ function NumberPickerWidget:init()
|
||||
callback_input = function()
|
||||
input_dialog = InputDialog:new{
|
||||
title = _("Enter number"),
|
||||
input = self.formatted_value,
|
||||
input_hint = T("%1 (%2 - %3)", self.formatted_value, self.value_min, self.value_max),
|
||||
input_type = "number",
|
||||
buttons = {
|
||||
{
|
||||
@@ -140,7 +140,6 @@ function NumberPickerWidget:init()
|
||||
text = _("OK"),
|
||||
is_enter_default = true,
|
||||
callback = function()
|
||||
input_dialog:closeInputDialog()
|
||||
local input_value = tonumber(input_dialog:getInputText())
|
||||
if input_value and input_value >= self.value_min and input_value <= self.value_max then
|
||||
self.value = input_value
|
||||
|
||||
Reference in New Issue
Block a user