mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Checkbutton widget optimization (#8522)
-checkmark toggling is separated from the callback -default width added
This commit is contained in:
@@ -139,20 +139,12 @@ function ReaderSearch:onShowFulltextSearchInput()
|
||||
text = _("Case sensitive"),
|
||||
checked = not self.case_insensitive,
|
||||
parent = self.input_dialog,
|
||||
max_width = self.input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
self.check_button_case:toggleCheck()
|
||||
end,
|
||||
}
|
||||
self.input_dialog:addWidget(self.check_button_case)
|
||||
self.check_button_regex = CheckButton:new{
|
||||
text = _("Regular expression (long-press for help)"),
|
||||
checked = self.use_regex,
|
||||
parent = self.input_dialog,
|
||||
max_width = self.input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
self.check_button_regex:toggleCheck()
|
||||
end,
|
||||
hold_callback = function()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = help_text,
|
||||
|
||||
Reference in New Issue
Block a user