From 89c0bd08863748dc8338987cb98dcb59436e26d3 Mon Sep 17 00:00:00 2001 From: poire-z Date: Sat, 16 Nov 2019 17:43:28 +0100 Subject: [PATCH] ConfigDialog: allow larger toggle title text Avoid a few truncated text, as some fit when allowed to bite a bit on the (large) left padding. --- frontend/ui/widget/configdialog.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/ui/widget/configdialog.lua b/frontend/ui/widget/configdialog.lua index 412018a12..4135ecc2f 100644 --- a/frontend/ui/widget/configdialog.lua +++ b/frontend/ui/widget/configdialog.lua @@ -265,7 +265,10 @@ function ConfigOption:init() if self.options[c].name_text then -- the horizontal padding on the left will be ensured by the RightContainer local name_widget_width = math.floor(name_align * Screen:getWidth()) - local name_text_max_width = name_widget_width - default_option_hpadding - 2*padding_small + -- We don't remove default_option_hpadding from name_text_max_width + -- to give more to text and avoid truncation: as it is right aligned, + -- the text can grow on the left, padding_small is enough. + local name_text_max_width = name_widget_width - 2*padding_small local text = self.options[c].name_text local face = Font:getFace(name_font_face, name_font_size) local option_name_container = RightContainer:new{