DoubleSpinWidget, SpinWidget: add units, make usage more consistent (#9046)

This commit is contained in:
zwim
2022-05-24 00:25:50 +02:00
committed by GitHub
parent 13274d6212
commit d5d5867d4e
18 changed files with 184 additions and 75 deletions

View File

@@ -22,6 +22,7 @@ local VerticalSpan = require("ui/widget/verticalspan")
local WidgetContainer = require("ui/widget/container/widgetcontainer")
local time = require("ui/time")
local _ = require("gettext")
local C_ = _.pgettext
local Screen = Device.screen
local FrontLightWidget = FocusManager:new{
@@ -181,7 +182,7 @@ function FrontLightWidget:layout()
self.fl_level,
}
local fl_min = Button:new{
text = _("Min"),
text = C_("Extrema", "Min"),
margin = Size.margin.small,
radius = 0,
enabled = true,
@@ -192,7 +193,7 @@ function FrontLightWidget:layout()
end, -- min is 1 (We use 0 to mean "toggle")
}
local fl_max = Button:new{
text = _("Max"),
text = C_("Extrema", "Max"),
margin = Size.margin.small,
radius = 0,
enabled = true,
@@ -310,7 +311,7 @@ function FrontLightWidget:layout()
self.nl_level,
}
local nl_min = Button:new{
text = _("Min"),
text = C_("Extrema", "Min"),
margin = Size.margin.small,
radius = 0,
enabled = true,
@@ -321,7 +322,7 @@ function FrontLightWidget:layout()
end,
}
local nl_max = Button:new{
text = _("Max"),
text = C_("Extrema", "Max"),
margin = Size.margin.small,
radius = 0,
enabled = true,