Merge pull request #9781 from chennes/splashscreen
GUI: Update Splashscreen for 0.21
This commit is contained in:
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 |
@@ -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();
|
||||
|
||||
@@ -159,9 +159,9 @@ 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()["SplashInfoColor" ] = "#c8c8c8"; // light grey
|
||||
App::Application::Config()["SplashInfoPosition" ] = "15.210";
|
||||
App::Application::Config()["SplashTextColor" ] = "#8aadf4"; // light blue
|
||||
App::Application::Config()["SplashInfoColor" ] = "#8aadf4"; // light blue
|
||||
App::Application::Config()["SplashInfoPosition" ] = "6,75";
|
||||
|
||||
QGuiApplication::setDesktopFileName(QStringLiteral("org.freecad.FreeCAD.desktop"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user