TextViewer: add Find (#9507)
This commit is contained in:
1 parent
c3cd88e019
commit
56388aa491
8 files changed
+261
-130
No files matched your search
@@ -1366,6 +1366,7 @@ function ReaderHighlight:viewSelectionHTML(debug_view, no_css_files_buttons)
|
||||
justified = false,
|
||||
para_direction_rtl = false,
|
||||
auto_para_direction = false,
|
||||
add_default_buttons = true,
|
||||
buttons_table = {
|
||||
{{
|
||||
text = _("Prettify"),
|
||||
@@ -1382,19 +1383,13 @@ function ReaderHighlight:viewSelectionHTML(debug_view, no_css_files_buttons)
|
||||
})
|
||||
end,
|
||||
}},
|
||||
{{
|
||||
text = _("Close"),
|
||||
callback = function()
|
||||
UIManager:close(cssviewer)
|
||||
end,
|
||||
}},
|
||||
}
|
||||
}
|
||||
UIManager:show(cssviewer)
|
||||
end,
|
||||
hold_callback = buttons_hold_callback,
|
||||
}
|
||||
-- One button per row, too make room for the possibly long css filename
|
||||
-- One button per row, to make room for the possibly long css filename
|
||||
table.insert(buttons_table, {button})
|
||||
end
|
||||
end
|
||||
@@ -1418,13 +1413,6 @@ function ReaderHighlight:viewSelectionHTML(debug_view, no_css_files_buttons)
|
||||
end,
|
||||
hold_callback = buttons_hold_callback,
|
||||
}})
|
||||
table.insert(buttons_table, {{
|
||||
text = _("Close"),
|
||||
callback = function()
|
||||
UIManager:close(textviewer)
|
||||
end,
|
||||
hold_callback = buttons_hold_callback,
|
||||
}})
|
||||
textviewer = TextViewer:new{
|
||||
title = _("Selection HTML"),
|
||||
text = html,
|
||||
@@ -1432,6 +1420,8 @@ function ReaderHighlight:viewSelectionHTML(debug_view, no_css_files_buttons)
|
||||
justified = false,
|
||||
para_direction_rtl = false,
|
||||
auto_para_direction = false,
|
||||
add_default_buttons = true,
|
||||
default_hold_callback = buttons_hold_callback,
|
||||
buttons_table = buttons_table,
|
||||
}
|
||||
UIManager:show(textviewer)
|
||||
|
||||
Reference in new issue
Block a user