From fce63d3c0f0b8c742a541f63d8514d3fa8f36e01 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Fri, 16 Apr 2021 23:01:24 +0300 Subject: [PATCH] Numberpicker: show hint with boundaries instead of the current value (#7529) * Numberpicker: show hint with boundaries * Show current value in the hint --- frontend/ui/widget/numberpickerwidget.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/ui/widget/numberpickerwidget.lua b/frontend/ui/widget/numberpickerwidget.lua index 5add128ed..2ecbd7eb5 100644 --- a/frontend/ui/widget/numberpickerwidget.lua +++ b/frontend/ui/widget/numberpickerwidget.lua @@ -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