]> git.lyx.org Git - features.git/commitdiff
Localize slogan on LyX banner
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 29 Apr 2018 09:26:25 +0000 (11:26 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 29 Apr 2018 09:26:25 +0000 (11:26 +0200)
Fixes: #11107
lib/images/banner.png
lib/images/banner.svgz
lib/images/banner@2x.png
src/frontends/qt4/GuiView.cpp

index b674f3c8c73fee9d16cbc7204477a957d3da596e..10f9b66ed46f528bb9fa8405aab55064c709a4e7 100644 (file)
Binary files a/lib/images/banner.png and b/lib/images/banner.png differ
index f93526bc162c61655f3d4ad05f3251443d8e833e..460cdf3784c7682812d8a7390598675a560fe4b4 100644 (file)
Binary files a/lib/images/banner.svgz and b/lib/images/banner.svgz differ
index 78ae4fdc26491bfafb09946e54fdbed92f4061b9..35c108cbde880ec84685213f3adef14f53ff205f 100644 (file)
Binary files a/lib/images/banner@2x.png and b/lib/images/banner@2x.png differ
index 5d4fb2e19e7063e76e8aa132425302c29340d9e1..3e661790b9e129da7764dec43275eb78e38f4a0b 100644 (file)
@@ -157,6 +157,8 @@ public:
                if (!lyxrc.show_banner)
                        return;
                /// The text to be written on top of the pixmap
+               QString const htext = qt_("The Document\nProcessor[[welcome banner]]");
+               /// The text to be written on top of the pixmap
                QString const text = lyx_version ?
                        qt_("version ") + lyx_version : qt_("unknown version");
 #if QT_VERSION >= 0x050000
@@ -178,7 +180,9 @@ public:
                QPainter pain(&splash_);
                pain.setPen(QColor(0, 0, 0));
                qreal const fsize = fontSize();
-               QPointF const position = textPosition();
+               QPointF const position = textPosition(false);
+               QPointF const hposition = textPosition(true);
+               QRectF const hrect(hposition, splashSize());
                LYXERR(Debug::GUI,
                        "widget pixel ratio: " << pixelRatio() <<
                        " splash pixel ratio: " << splashPixelRatio() <<
@@ -190,6 +194,12 @@ public:
                font.setPointSizeF(fsize);
                pain.setFont(font);
                pain.drawText(position, text);
+               // The font used to display the version info
+               font.setStyleHint(QFont::SansSerif);
+               font.setWeight(QFont::Normal);
+               font.setPointSize(20);
+               pain.setFont(font);
+               pain.drawText(hrect, Qt::AlignLeft, htext);
                setFocusPolicy(Qt::StrongFocus);
        }
 
@@ -237,8 +247,9 @@ private:
                return toqstr(lyxrc.font_sizes[FONT_SIZE_NORMAL]).toDouble();
        }
 
-       QPointF textPosition() const {
-               return QPointF(width_/2 - 18, height_/2 + 45);
+       QPointF textPosition(bool const heading) const {
+               return heading ? QPointF(width_/2 - 18, height_/2 - 45)
+                              : QPointF(width_/2 - 18, height_/2 + 45);
        }
 
        QSize splashSize() const {