From 5d63907caea353b9efdd3803eaff53145d01dccc Mon Sep 17 00:00:00 2001 From: Philip Chan Date: Thu, 16 May 2024 00:29:32 +0800 Subject: [PATCH] fix #11810: only set FocusManager layout if hasDPod (#11811) --- frontend/ui/widget/dictquicklookup.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/ui/widget/dictquicklookup.lua b/frontend/ui/widget/dictquicklookup.lua index 00f11f167..952cc0b13 100644 --- a/frontend/ui/widget/dictquicklookup.lua +++ b/frontend/ui/widget/dictquicklookup.lua @@ -721,8 +721,10 @@ function DictQuickLookup:init() -- NT: add dict_title.left_button and lookup_edit_button to FocusManager. -- It is better to add these two buttons into self.movable, but it is not a FocusManager. -- Only self.button_table is a FocusManager, so workaground is inserting these two buttons into self.button_table.layout. - table.insert(self.button_table.layout, 1, { self.dict_title.left_button }); - table.insert(self.button_table.layout, 2, { lookup_edit_button }); + if Device:hasDPad() then + table.insert(self.button_table.layout, 1, { self.dict_title.left_button }); + table.insert(self.button_table.layout, 2, { lookup_edit_button }); + end -- We're a new window table.insert(DictQuickLookup.window_list, self)