From 29b376fdd9d1ed2a6d854b7e3ad82fbdf910ef2a Mon Sep 17 00:00:00 2001 From: TnS-hun Date: Mon, 20 Nov 2017 09:40:00 +0100 Subject: [PATCH] [UX] Option to show dictionary in large window (#3499) --- frontend/apps/reader/modules/readerdictionary.lua | 9 +++++++++ frontend/ui/widget/dictquicklookup.lua | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerdictionary.lua b/frontend/apps/reader/modules/readerdictionary.lua index 2bea3c360..afb675b85 100644 --- a/frontend/apps/reader/modules/readerdictionary.lua +++ b/frontend/apps/reader/modules/readerdictionary.lua @@ -251,6 +251,15 @@ If you'd like to change the order in which dictionaries are queried (and their r }) end, }, + { -- setting used by dictquicklookup + text = _("Large window"), + checked_func = function() + return G_reader_settings:isTrue("dict_largewindow") + end, + callback = function() + G_reader_settings:flipNilOrFalse("dict_largewindow") + end, + }, { -- setting used by dictquicklookup text = _("Justify text"), checked_func = function() diff --git a/frontend/ui/widget/dictquicklookup.lua b/frontend/ui/widget/dictquicklookup.lua index 22b0e6e76..74ba28cb5 100644 --- a/frontend/ui/widget/dictquicklookup.lua +++ b/frontend/ui/widget/dictquicklookup.lua @@ -165,7 +165,7 @@ function DictQuickLookup:update() w = Screen:getWidth(), h = Screen:getHeight(), } - if self.is_fullpage then + if self.is_fullpage or G_reader_settings:isTrue("dict_largewindow") then -- bigger window if fullpage being shown - this will let -- some room anyway for footer display (time, battery...) self.height = Screen:getHeight()