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:
@@ -916,10 +916,6 @@ function ReaderBookmark:onSearchBookmark(bm_menu)
|
||||
text = " " .. _("Case sensitive"),
|
||||
checked = false,
|
||||
parent = input_dialog,
|
||||
max_width = input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
check_button_case:toggleCheck()
|
||||
end,
|
||||
}
|
||||
input_dialog:addWidget(check_button_case)
|
||||
separator = CenterContainer:new{
|
||||
@@ -940,30 +936,18 @@ function ReaderBookmark:onSearchBookmark(bm_menu)
|
||||
text = " " .. DISPLAY_PREFIX["highlight"] .. _("highlights"),
|
||||
checked = true,
|
||||
parent = input_dialog,
|
||||
max_width = input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
check_button_highlight:toggleCheck()
|
||||
end,
|
||||
}
|
||||
input_dialog:addWidget(check_button_highlight)
|
||||
check_button_note = CheckButton:new{
|
||||
text = " " .. DISPLAY_PREFIX["note"] .. _("notes"),
|
||||
checked = true,
|
||||
parent = input_dialog,
|
||||
max_width = input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
check_button_note:toggleCheck()
|
||||
end,
|
||||
}
|
||||
input_dialog:addWidget(check_button_note)
|
||||
check_button_bookmark = CheckButton:new{
|
||||
text = " " .. DISPLAY_PREFIX["bookmark"] .. _("page bookmarks"),
|
||||
checked = true,
|
||||
parent = input_dialog,
|
||||
max_width = input_dialog._input_widget.width,
|
||||
callback = function()
|
||||
check_button_bookmark:toggleCheck()
|
||||
end,
|
||||
}
|
||||
input_dialog:addWidget(check_button_bookmark)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user