diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-08-11 22:50:27 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-08-15 15:04:11 +0300 |
commit | 59eddc62594d2c8003349812456befeef82e1bc2 (patch) | |
tree | 643223aba830729321b8a5e69aa257efd929a874 /templatelayout.h | |
parent | 0ced68f15d57fe7487ec7286fb0e2358dd604092 (diff) | |
download | subsurface-59eddc62594d2c8003349812456befeef82e1bc2.tar.gz |
Printing: export border to templates
As there is a problem with sizing the borders in QWebView, "vw" sizing is not
working as supposed with border-width, As a workaround we export border-width
dynamically, so that border-width is relatively the same for all page sizes.
The border-width is equal to the page width / 1000 which gives a nice range
for borders for A0 - A5 papers, Also prevent drawing zero pixel borders
and use 1 px borders as the minimum border.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Diffstat (limited to 'templatelayout.h')
-rw-r--r-- | templatelayout.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/templatelayout.h b/templatelayout.h index 07e3ae060..41a3cbfa9 100644 --- a/templatelayout.h +++ b/templatelayout.h @@ -151,6 +151,8 @@ if (property == "font") { case 4: return "Verdana, Geneva, sans-serif"; } +} else if (property == "borderwidth") { + return object.border_width; } else if (property == "font_size") { return object.font_size / 9.0; } else if (property == "line_spacing") { |