mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: support the "Border width" setting for templates
Going to "Template -> Edit" now has a field to enter the border width (in pixels as only that makes sense in CSS as a flexible unit, TMK). This field modifies the template_options.borderwidth Grantlee property which is part of the bundled templates already and allows the users to modify the borders of tables. The C++ implementation was missing, while the HTML (template) implementation was already in place. Overlooked during GSoC. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
831fe3d7f9
commit
e8c918622f
6 changed files with 44 additions and 2 deletions
|
@ -51,6 +51,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) :
|
|||
templateOptions.font_size = s.value("font_size", 9).toDouble();
|
||||
templateOptions.color_palette_index = s.value("color_palette", SSRF_COLORS).toInt();
|
||||
templateOptions.line_spacing = s.value("line_spacing", 1).toDouble();
|
||||
templateOptions.border_width = s.value("border_width", 1).toInt();
|
||||
custom_colors.color1 = QColor(s.value("custom_color_1", ssrf_colors.color1).toString());
|
||||
custom_colors.color2 = QColor(s.value("custom_color_2", ssrf_colors.color2).toString());
|
||||
custom_colors.color3 = QColor(s.value("custom_color_3", ssrf_colors.color3).toString());
|
||||
|
@ -148,6 +149,7 @@ void PrintDialog::onFinished()
|
|||
s.setValue("font_size", templateOptions.font_size);
|
||||
s.setValue("color_palette", templateOptions.color_palette_index);
|
||||
s.setValue("line_spacing", templateOptions.line_spacing);
|
||||
s.setValue("border_width", templateOptions.border_width);
|
||||
|
||||
// save custom colors
|
||||
s.setValue("custom_color_1", custom_colors.color1.name());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue