mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
avoid float-conversion warning and simplify size computation
This commit is contained in:
parent
a830e51c8a
commit
43dd383073
@ -236,24 +236,18 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal fontSize() {
|
qreal fontSize() const {
|
||||||
return toqstr(lyxrc.font_sizes[FONT_SIZE_LARGE]).toDouble();
|
return toqstr(lyxrc.font_sizes[FONT_SIZE_LARGE]).toDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointF textPosition() {
|
QPointF textPosition() const {
|
||||||
return QPointF(splashWidth()/2 - 16, splashHeigth() - 40);
|
return QPointF(width_/2 - 16, height_ - 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize splashSize() {
|
QSize splashSize() const {
|
||||||
return QSize(width_ * pixelRatio(),height_ * pixelRatio());
|
return QSize(
|
||||||
}
|
static_cast<unsigned int>(width_ * pixelRatio()),
|
||||||
|
static_cast<unsigned int>(height_ * pixelRatio()));
|
||||||
double splashWidth() {
|
|
||||||
return splash_.width()/splashPixelRatio();
|
|
||||||
}
|
|
||||||
|
|
||||||
double splashHeigth() {
|
|
||||||
return splash_.height()/splashPixelRatio();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ratio between physical pixels and device-independent pixels of splash image
|
/// Ratio between physical pixels and device-independent pixels of splash image
|
||||||
|
Loading…
Reference in New Issue
Block a user