GUI: Update Splashscreen

This commit is contained in:
Chris Hennes
2023-06-15 09:57:27 -05:00
parent 6f026f5c34
commit 927c3b9731
5 changed files with 9 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 396 KiB

View File

@@ -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();

View File

@@ -159,7 +159,7 @@ int main( int argc, char ** argv )
App::Application::Config()["StartWorkbench"] = "StartWorkbench";
//App::Application::Config()["HiddenDockWindow"] = "Property editor";
App::Application::Config()["SplashAlignment" ] = "Bottom|Left";
App::Application::Config()["SplashTextColor" ] = "#ffffff"; // white
App::Application::Config()["SplashTextColor" ] = "#8aadf4"; // light blue
App::Application::Config()["SplashInfoColor" ] = "#c8c8c8"; // light grey
App::Application::Config()["SplashInfoPosition" ] = "15.210";