GUI: Update Splashscreen
This commit is contained in:
@@ -1752,11 +1752,14 @@ QPixmap MainWindow::splashImage() const
|
||||
fontExe.setPointSizeF(20.0);
|
||||
QFontMetrics metricExe(fontExe);
|
||||
int l = QtTools::horizontalAdvance(metricExe, title);
|
||||
if (title == QLatin1String("FreeCAD")) {
|
||||
l = 0.0; // "FreeCAD" text is already part of the splashscreen, version goes below it
|
||||
}
|
||||
int w = splash_image.width();
|
||||
int h = splash_image.height();
|
||||
|
||||
QFont fontVer = painter.font();
|
||||
fontVer.setPointSizeF(12.0);
|
||||
fontVer.setPointSizeF(14.0);
|
||||
QFontMetrics metricVer(fontVer);
|
||||
int v = QtTools::horizontalAdvance(metricVer, version);
|
||||
|
||||
@@ -1777,7 +1780,10 @@ QPixmap MainWindow::splashImage() const
|
||||
if (color.isValid()) {
|
||||
painter.setPen(color);
|
||||
painter.setFont(fontExe);
|
||||
painter.drawText(x, y, title);
|
||||
if (title != QLatin1String("FreeCAD")) {
|
||||
// FreeCAD's Splashscreen already contains the EXE name, no need to draw it
|
||||
painter.drawText(x, y, title);
|
||||
}
|
||||
painter.setFont(fontVer);
|
||||
painter.drawText(x + (l + 5), y, version);
|
||||
painter.end();
|
||||
|
||||
Reference in New Issue
Block a user