On Sun, Apr 29, 2018 at 11:56:40AM +0200, Juergen Spitzmueller wrote:

> commit 54aa0addeeed6b3e24c144007da15eb0248a4fc8
> Author: Juergen Spitzmueller <sp...@lyx.org>
> Date:   Sun Apr 29 11:56:17 2018 +0200
> 
>     Allow adjustment of banner slogan size to localized slogan

I suggest not to use absolute sizes. I recommend the attached patch.

-- 
Enrico
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 10cc5e278c..5153d635c4 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -158,7 +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]]");
+               QString const htextsize = qt_("1.6[[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");
@@ -182,9 +182,9 @@ public:
                pain.setPen(QColor(0, 0, 0));
                qreal const fsize = fontSize();
                bool ok;
-               qreal hfsize = htextsize.toFloat(&ok);
+               qreal hscale = htextsize.toFloat(&ok);
                if (!ok)
-                       hfsize = 20;
+                       hscale = 1.6;
                QPointF const position = textPosition(false);
                QPointF const hposition = textPosition(true);
                QRectF const hrect(hposition, splashSize());
@@ -202,7 +202,7 @@ public:
                // The font used to display the version info
                font.setStyleHint(QFont::SansSerif);
                font.setWeight(QFont::Normal);
-               font.setPointSizeF(hfsize);
+               font.setPointSizeF(hscale * fsize);
                pain.setFont(font);
                pain.drawText(hrect, Qt::AlignLeft, htext);
                setFocusPolicy(Qt::StrongFocus);

Reply via email to