Assorted fixes after #7118 (#7161)

* I'd failed to notice that ButtonTable *also* instantiates seven billion Buttons on each update. Unfortunately, that one is way trickier to fix properly, so, work around its behavior in Button. (This fixes multiple issues with stuff using ButtonTable, which is basically anything with a persistent set of buttons. A good and easy test-case is the dictionary popup, e.g., the Highlight button changes text, and the next/prev dic buttons change state. All that, and more, was broken ;p).

* Handle corner-cases related to VirtualKeyboard (e.g., Terminal & Text Editor), which screwed with both TouchMenu & Button heuristics because it's weird.

* Flag a the dictionary switch buttons as vsync

(They trigger a partial repaint of the dictionary content).

* Flag the ReaderSearch buttons as vsync

They very obviously trigger a partial repaint, much like SkimTo ;p.
This commit is contained in:
NiLuJe
2021-01-18 16:51:25 +01:00
committed by GitHub
parent 66eb939936
commit 0c76c73e4f
7 changed files with 82 additions and 19 deletions

View File

@@ -47,6 +47,7 @@ function ReaderSearch:onShowFulltextSearchInput()
},
{
text = backward_text,
vsync = true,
callback = function()
self:onShowSearchDialog(self.input_dialog:getInputText(), 1)
self:closeInputDialog()
@@ -54,6 +55,7 @@ function ReaderSearch:onShowFulltextSearchInput()
},
{
text = forward_text,
vsync = true,
is_enter_default = true,
callback = function()
self:onShowSearchDialog(self.input_dialog:getInputText(), 0)
@@ -159,18 +161,22 @@ function ReaderSearch:onShowSearchDialog(text, direction)
{
{
text = from_start_text,
vsync = true,
callback = do_search(self.searchFromStart, text),
},
{
text = backward_text,
vsync = true,
callback = do_search(self.searchNext, text, 1),
},
{
text = forward_text,
vsync = true,
callback = do_search(self.searchNext, text, 0),
},
{
text = from_end_text,
vsync = true,
callback = do_search(self.searchFromEnd, text),
},
}