From f0a3bcf05bd532b755b9d7f0c028d2dd813c3560 Mon Sep 17 00:00:00 2001 From: Philip Chan Date: Sun, 12 May 2024 15:50:15 +0800 Subject: [PATCH] NT: add Hot swapping dictionaries button and edit button into FocusManager's layout (#11803) fix #11783 --- frontend/ui/widget/dictquicklookup.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/ui/widget/dictquicklookup.lua b/frontend/ui/widget/dictquicklookup.lua index 7ae794f972c4..00f11f1678b4 100644 --- a/frontend/ui/widget/dictquicklookup.lua +++ b/frontend/ui/widget/dictquicklookup.lua @@ -718,6 +718,12 @@ function DictQuickLookup:init() self.movable, } + -- 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 }); + -- We're a new window table.insert(DictQuickLookup.window_list, self) end