Skip to content

Commit

Permalink
NT: add Hot swapping dictionaries button and edit button into FocusMa…
Browse files Browse the repository at this point in the history
…nager's layout (#11803)

fix #11783
  • Loading branch information
comphilip committed May 12, 2024
1 parent 7ba4257 commit f0a3bcf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/ui/widget/dictquicklookup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0a3bcf

Please sign in to comment.