Provide high-res version of logo

This commit is contained in:
Matthias Koefferlein 2022-10-05 23:50:43 +02:00
parent 774b008417
commit ddff1f564f
4 changed files with 8 additions and 1 deletions

View File

@ -117,6 +117,7 @@
<file alias="left_16px.png">images/left_16px.png</file>
<file alias="left_16px@2x.png">images/left_16px@2x.png</file>
<file alias="logo.png">images/logo.png</file>
<file alias="logo@2x.png">images/logo@2x.png</file>
<file alias="lt_31px.png">images/lt_31px.png</file>
<file alias="lt_31px@2x.png">images/lt_31px@2x.png</file>
<file alias="m0_24px.png">images/m0_24px.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 57 KiB

BIN
src/icons/images/logo@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -35,7 +35,13 @@ ViewWidgetStack::ViewWidgetStack (QWidget *parent, const char *name)
mp_bglabel = new QLabel (this);
mp_bglabel->setAutoFillBackground (true);
mp_bglabel->setText (QObject::tr ("<html><body><p><img src=\":/logo.png\"/></p><p>Use File/Open to open a layout</p></body></html>"));
std::string logo = "logo.png";
#if QT_VERSION >= 0x50000
if (devicePixelRatio () >= 2.0) {
logo = "logo@2x.png";
}
#endif
mp_bglabel->setText (QObject::tr ("<html><body><p><img src=\":/%1\" width=\"256\" height=\"256\"/></p><p>Use File/Open to open a layout</p></body></html>").arg (tl::to_qstring (logo)));
mp_bglabel->setAlignment (Qt::AlignVCenter | Qt::AlignHCenter);
mp_bglabel->show ();
}