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
|
|
@ -47,7 +47,7 @@ void DiveCartesianAxis::setTextColor(const QColor &color)
|
|||
textColor = color;
|
||||
}
|
||||
|
||||
DiveCartesianAxis::DiveCartesianAxis(double fontPrintScale, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis::DiveCartesianAxis(double dpr, bool printMode, ProfileScene &scene) :
|
||||
printMode(printMode),
|
||||
scene(scene),
|
||||
orientation(LeftToRight),
|
||||
|
|
@ -60,7 +60,7 @@ DiveCartesianAxis::DiveCartesianAxis(double fontPrintScale, bool printMode, Prof
|
|||
labelScale(1.0),
|
||||
line_size(1),
|
||||
changed(true),
|
||||
fontPrintScale(fontPrintScale)
|
||||
dpr(dpr)
|
||||
{
|
||||
setPen(gridPen());
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ void DiveCartesianAxis::updateTicks(int animSpeed, color_index_t color)
|
|||
} else {
|
||||
childPos = begin - i * stepSize;
|
||||
}
|
||||
DiveTextItem *label = new DiveTextItem(fontPrintScale, this);
|
||||
DiveTextItem *label = new DiveTextItem(dpr, this);
|
||||
label->setText(textForValue(currValueText));
|
||||
label->setBrush(colorForValue(currValueText));
|
||||
label->setScale(labelScale);
|
||||
|
|
@ -339,7 +339,7 @@ QColor DepthAxis::colorForValue(double) const
|
|||
return QColor(Qt::red);
|
||||
}
|
||||
|
||||
DepthAxis::DepthAxis(double fontPrintScale, bool printMode, ProfileScene &scene) : DiveCartesianAxis(fontPrintScale, printMode, scene)
|
||||
DepthAxis::DepthAxis(double dpr, bool printMode, ProfileScene &scene) : DiveCartesianAxis(dpr, printMode, scene)
|
||||
{
|
||||
changed = true;
|
||||
}
|
||||
|
|
@ -372,8 +372,8 @@ QString TemperatureAxis::textForValue(double value) const
|
|||
return QString::number(mkelvin_to_C((int)value));
|
||||
}
|
||||
|
||||
PartialGasPressureAxis::PartialGasPressureAxis(const DivePlotDataModel &model, double fontPrintScale, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis(fontPrintScale, printMode, scene),
|
||||
PartialGasPressureAxis::PartialGasPressureAxis(const DivePlotDataModel &model, double dpr, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis(dpr, printMode, scene),
|
||||
model(model)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue