Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #3840

Merged
merged 5 commits into from Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/device/kobo/nickel_conf.lua
Expand Up @@ -85,7 +85,6 @@ function NickelConf.colorSetting.get()
if new_colorsetting then
return tonumber(new_colorsetting)
end
return nil
end

function NickelConf.autoColorEnabled.get()
Expand Down
7 changes: 5 additions & 2 deletions frontend/device/kobo/powerd.lua
Expand Up @@ -233,9 +233,12 @@ function KoboPowerD:calculateAutoWarmth()
if diff_time < 12 then
-- We are before bedtime. Use a slower progression over 5h.
self.fl_warmth = math.max(20 * (5 - diff_time), 0)
elseif diff_time > 22 then
-- Keep warmth at maximum for two hours after bedtime.
self.fl_warmth = 100
else
-- After bedtime, it only takes 2h to reach zero warmth.
self.fl_warmth = math.max(100 - 50 * (24 - diff_time), 0)
-- Between 2-4h after bedtime, return to zero.
self.fl_warmth = math.max(100 - 50 * (22 - diff_time), 0)
end
self.fl_warmth = math.floor(self.fl_warmth + 0.5)
-- Enable background job for setting Warmth, if not already done.
Expand Down
4 changes: 2 additions & 2 deletions frontend/ui/widget/frontlightwidget.lua
Expand Up @@ -387,7 +387,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)
button_max,
}
local checkbutton_auto_nl = CheckButton:new({
text = _("Automatic warmth"),
text = _("Auto"),
checked = self.powerd.auto_warmth,
callback = function()
if self.powerd.auto_warmth then
Expand All @@ -402,7 +402,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)

local text_auto_nl = TextBoxWidget:new{
-- @TODO implement padding_right (etc.) on TextBoxWidget and remove the two-space hack
text = _("Maximum at:") .. " ",
text = _("Max. at:") .. " ",
face = self.larger_font_face,
alignment = "right",
fgcolor = self.powerd.auto_warmth and Blitbuffer.COLOR_BLACK or
Expand Down
4 changes: 2 additions & 2 deletions frontend/ui/widget/naturallightwidget.lua
Expand Up @@ -83,7 +83,7 @@ function NaturalLightWidget:adaptableNumber(initial, step)
}
input_text:unfocus()
local button_minus = Button:new{
text = "-",
text = "",
margin = Size.margin.small,
radius = 0,
width = self.button_width,
Expand Down Expand Up @@ -296,7 +296,7 @@ function NaturalLightWidget:createMainContent(width, height)
end,
}
local button_ok = Button:new{
text = "Save settings",
text = "Save",
margin = Size.margin.small,
radius = 0,
width = self.width * 0.2,
Expand Down