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
				
			
		|  | @ -237,7 +237,7 @@ void Printer::print() | |||
| 	webView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); | ||||
| #endif | ||||
| 	// export border width with at least 1 pixel
 | ||||
| 	templateOptions->border_width = std::max(1, pageSize.width() / 1000); | ||||
| 	// templateOptions->borderwidth = std::max(1, pageSize.width() / 1000);
 | ||||
| 	if (printOptions->type == print_options::DIVELIST) { | ||||
| 		webView->setHtml(t.generate()); | ||||
| 	} else if (printOptions->type == print_options::STATISTICS ) { | ||||
|  | @ -284,7 +284,7 @@ void Printer::previewOnePage() | |||
| 		webView->page()->setViewportSize(pageSize); | ||||
| #endif | ||||
| 		// initialize the border settings
 | ||||
| 		templateOptions->border_width = std::max(1, pageSize.width() / 1000); | ||||
| 		// templateOptions->border_width = std::max(1, pageSize.width() / 1000);
 | ||||
| 		if (printOptions->type == print_options::DIVELIST) { | ||||
| 			webView->setHtml(t.generate()); | ||||
| 		} else if (printOptions->type == print_options::STATISTICS ) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue