summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/templateedit.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-03-06 18:41:54 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-06 20:08:39 -0800
commite8c918622fbd7072b3ff53e1d97148fbfd4274ff (patch)
treebbe410224be7a9e536fef684166344523a41f7e9 /desktop-widgets/templateedit.cpp
parent831fe3d7f9e339edb3ac19205514022ab2b00551 (diff)
downloadsubsurface-e8c918622fbd7072b3ff53e1d97148fbfd4274ff.tar.gz
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>
Diffstat (limited to 'desktop-widgets/templateedit.cpp')
-rw-r--r--desktop-widgets/templateedit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop-widgets/templateedit.cpp b/desktop-widgets/templateedit.cpp
index 4964016b9..ea6314075 100644
--- a/desktop-widgets/templateedit.cpp
+++ b/desktop-widgets/templateedit.cpp
@@ -20,6 +20,7 @@ TemplateEdit::TemplateEdit(QWidget *parent, struct print_options *printOptions,
ui->fontsize->setValue(templateOptions->font_size);
ui->colorpalette->setCurrentIndex(templateOptions->color_palette_index);
ui->linespacing->setValue(templateOptions->line_spacing);
+ ui->borderwidth->setValue(templateOptions->border_width);
grantlee_template = TemplateLayout::readTemplate(printOptions->p_template);
if (printOptions->type == print_options::DIVELIST)
@@ -97,6 +98,12 @@ void TemplateEdit::on_linespacing_valueChanged(double line_spacing)
updatePreview();
}
+void TemplateEdit::on_borderwidth_valueChanged(double border_width)
+{
+ newTemplateOptions.border_width = (int)border_width;
+ updatePreview();
+}
+
void TemplateEdit::on_fontSelection_currentIndexChanged(int index)
{
newTemplateOptions.font_index = index;