Checkbutton: ensure max width, multiline if needed (#8066)

This commit is contained in:
hius07
2021-08-14 01:49:19 +03:00
committed by GitHub
parent b622d6edd8
commit c8a7f52672
6 changed files with 25 additions and 7 deletions

View File

@@ -399,6 +399,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)
local checkbutton_auto_nl = CheckButton:new({
text = _("Auto"),
checked = self.powerd.auto_warmth,
max_width = math.floor(self.screen_width * 0.3),
callback = function()
if self.powerd.auto_warmth then
self.powerd.auto_warmth = false