From b41567e0e6d15049d6b91bbfdb4a64aeed21bdfa Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Wed, 3 Feb 2021 16:31:11 +0100 Subject: [PATCH] ConfigDialog: Check alt_name_text if name_text isn't set, as it is used for the "Set as default" popup. This allows having that text accurate on widgets without an actual name_text (e.g., the font size wheel). Fix #7231 Co-authored-by: Frans de Jonge --- frontend/ui/data/creoptions.lua | 1 + frontend/ui/widget/configdialog.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/ui/data/creoptions.lua b/frontend/ui/data/creoptions.lua index fb82c5684..b52fa93e8 100644 --- a/frontend/ui/data/creoptions.lua +++ b/frontend/ui/data/creoptions.lua @@ -337,6 +337,7 @@ Note that your selected font size is not affected by this setting.]]), options = { { name = "font_size", + alt_name_text = _("Font size"), item_text = tableOfNumbersToTableOfStrings(DCREREADER_CONFIG_FONT_SIZES), item_align_center = 1.0, spacing = 15, diff --git a/frontend/ui/widget/configdialog.lua b/frontend/ui/widget/configdialog.lua index ee41a5627..a04974106 100644 --- a/frontend/ui/widget/configdialog.lua +++ b/frontend/ui/widget/configdialog.lua @@ -472,7 +472,7 @@ function ConfigOption:init() option_items[d] = option_item option_item.items = option_items option_item.name = self.options[c].name - option_item.name_text = name_text + option_item.name_text = name_text or self.options[c].alt_name_text option_item.item_text = self.options[c].item_text option_item.values = self.options[c].values option_item.args = self.options[c].args @@ -514,7 +514,7 @@ function ConfigOption:init() option_items[d] = option_item option_item.items = option_items option_item.name = self.options[c].name - option_item.name_text = name_text + option_item.name_text = name_text or self.options[c].alt_name_text option_item.values = self.options[c].values option_item.args = self.options[c].args option_item.event = self.options[c].event