Numberpicker: show hint with boundaries instead of the current value (#7529)

* Numberpicker: show hint with boundaries

* Show current value in the hint
reviewable/pr7553/r2
hius07 3 years ago committed by GitHub
parent c560be3740
commit fce63d3c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save