]> git.lyx.org Git - features.git/commitdiff
Allow adjustment of banner slogan size to localized slogan
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 29 Apr 2018 09:56:17 +0000 (11:56 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 29 Apr 2018 09:56:17 +0000 (11:56 +0200)
src/frontends/qt4/GuiView.cpp

index 3e661790b9e129da7764dec43275eb78e38f4a0b..10cc5e278c04aaf45e4e32f49b226a7f2d1cc1d0 100644 (file)
@@ -158,6 +158,7 @@ public:
                        return;
                /// The text to be written on top of the pixmap
                QString const htext = qt_("The Document\nProcessor[[welcome banner]]");
+               QString const htextsize = qt_("20[[possibly adjust the welcome banner text size; float value allowed]]");
                /// The text to be written on top of the pixmap
                QString const text = lyx_version ?
                        qt_("version ") + lyx_version : qt_("unknown version");
@@ -180,6 +181,10 @@ public:
                QPainter pain(&splash_);
                pain.setPen(QColor(0, 0, 0));
                qreal const fsize = fontSize();
+               bool ok;
+               qreal hfsize = htextsize.toFloat(&ok);
+               if (!ok)
+                       hfsize = 20;
                QPointF const position = textPosition(false);
                QPointF const hposition = textPosition(true);
                QRectF const hrect(hposition, splashSize());
@@ -197,7 +202,7 @@ public:
                // The font used to display the version info
                font.setStyleHint(QFont::SansSerif);
                font.setWeight(QFont::Normal);
-               font.setPointSize(20);
+               font.setPointSizeF(hfsize);
                pain.setFont(font);
                pain.drawText(hrect, Qt::AlignLeft, htext);
                setFocusPolicy(Qt::StrongFocus);