From bfb07c79ef07b36ed34b383026eaebeee75c87ec Mon Sep 17 00:00:00 2001 From: poire-z Date: Mon, 8 Jan 2018 12:23:37 +0100 Subject: [PATCH] Fix: scale html dict result font size (#3581) --- frontend/ui/widget/dictquicklookup.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/ui/widget/dictquicklookup.lua b/frontend/ui/widget/dictquicklookup.lua index 6adf3cea2..75608f96b 100644 --- a/frontend/ui/widget/dictquicklookup.lua +++ b/frontend/ui/widget/dictquicklookup.lua @@ -264,7 +264,7 @@ function DictQuickLookup:update() text_widget = ScrollHtmlWidget:new{ html_body = self.definition, css = self:getHtmlDictionaryCss(), - default_font_size = DDICT_FONT_SIZE, + default_font_size = Screen:scaleBySize(DDICT_FONT_SIZE), width = self.width, height = self.is_fullpage and self.height*0.75 or self.height*0.7, dialog = self, @@ -587,7 +587,12 @@ function DictQuickLookup:changeDictionary(index) -- add queried word to 1st result's definition, so we can see -- what was the selected text and if we selected wrong if index == 1 then - self.definition = self.definition.."\n_______\n"..T(_("(query : %1)"), self.word) + if self.is_html then + self.definition = self.definition.."
_______
" + else + self.definition = self.definition.."\n_______\n" + end + self.definition = self.definition..T(_("(query : %1)"), self.word) end end