mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: rename printFontScale to dpr (device pixel ratio)
The printFontScale is used to scale up fonts (and icons) when rendering to high-DPI devices. With absolute scaling, this will also be used to scale the size of different chart regions, line thickness, etc. Therefore, give it an more appropriate name. "Device pixel ratio", which is a well established term, seems to appropriately describe the concept. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d28f4d5347
commit
f713858ba4
15 changed files with 97 additions and 98 deletions
|
@ -107,10 +107,10 @@ void Printer::render(int pages)
|
|||
QWebElementCollection collection = webView->page()->mainFrame()->findAllElements(".diveprofile");
|
||||
|
||||
// A "standard" profile has about 600 pixels in height.
|
||||
// Scale the fonts in the printed profile accordingly.
|
||||
// Scale the items in the printed profile accordingly.
|
||||
// This is arbitrary, but it seems to work reasonably well.
|
||||
double printFontScale = collection.count() > 0 ? collection[0].geometry().size().height() / 600.0 : 1.0;
|
||||
auto profile = std::make_unique<ProfileScene>(printFontScale, true, !printOptions.color_selected);
|
||||
double dpr = collection.count() > 0 ? collection[0].geometry().size().height() / 600.0 : 1.0;
|
||||
auto profile = std::make_unique<ProfileScene>(dpr, true, !printOptions.color_selected);
|
||||
|
||||
// render the Qwebview
|
||||
QPainter painter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue