TextViewer: add dialog to set font size and justify text (#11210)

This commit is contained in:
hius07
2023-12-14 07:50:54 +02:00
committed by GitHub
parent fe02b83b6a
commit f4a5a2b60a
14 changed files with 180 additions and 131 deletions

View File

@@ -30,7 +30,6 @@ local ViewHtml = {
-- Or additionally show unicode codepoint of each char
{ _("Switch to unicode debug view"), 0xEB5E, true },
},
text_font_face = "smallinfont",
}
-- Main entry point
@@ -124,8 +123,7 @@ function ViewHtml:_viewSelectionHTML(document, selected_text, view, with_css_fil
cssviewer = TextViewer:new{
title = css_files[i],
text = css_text or _("Failed getting CSS content"),
text_font_face = self.text_font_face,
justified = false,
text_type = "code",
para_direction_rtl = false,
auto_para_direction = false,
add_default_buttons = true,
@@ -138,8 +136,7 @@ function ViewHtml:_viewSelectionHTML(document, selected_text, view, with_css_fil
UIManager:show(TextViewer:new{
title = css_files[i],
text = util.prettifyCSS(css_text),
text_font_face = self.text_font_face,
justified = false,
text_type = "code",
para_direction_rtl = false,
auto_para_direction = false,
})
@@ -185,8 +182,7 @@ function ViewHtml:_viewSelectionHTML(document, selected_text, view, with_css_fil
textviewer = TextViewer:new{
title = _("Selection HTML"),
text = html,
text_font_face = self.text_font_face,
justified = false,
text_type = "code",
para_direction_rtl = false,
auto_para_direction = false,
add_default_buttons = true,
@@ -420,8 +416,7 @@ function ViewHtml:_showMatchingSelectors(document, ancestors, show_all_ancestors
cssviewer = TextViewer:new{
title = title,
text = css_text or _("No matching rulesets"),
text_font_face = self.text_font_face,
justified = false,
text_type = "code",
para_direction_rtl = false,
auto_para_direction = false,
add_default_buttons = true,
@@ -434,8 +429,7 @@ function ViewHtml:_showMatchingSelectors(document, ancestors, show_all_ancestors
UIManager:show(TextViewer:new{
title = title,
text = util.prettifyCSS(css_text),
text_font_face = self.text_font_face,
justified = false,
text_type = "code",
para_direction_rtl = false,
auto_para_direction = false,
})