From 8d462a1edd6e7446746947bcb9537f1c800d38ef Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 21 Feb 2022 19:16:49 +0100 Subject: rbutil: Rework Logo display. Replace QLabel with QSvgWidget so the widget draws the svg directly instead of first creating a pixmap from it. This also avoids an issue when building with mxe which causes the image to not show due to a missing svg plugin (which doesn't happen for svg icons.) Change-Id: Ic4e265f0567984d1ffe7a3e1cc641df27755e90b --- utils/rbutilqt/CMakeLists.txt | 3 ++- utils/rbutilqt/rbutilqt.cpp | 1 + utils/rbutilqt/rbutilqtfrm.ui | 40 +++++++++++++++++++++------------------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/utils/rbutilqt/CMakeLists.txt b/utils/rbutilqt/CMakeLists.txt index cc1ecd575c..d0ac4d9a54 100644 --- a/utils/rbutilqt/CMakeLists.txt +++ b/utils/rbutilqt/CMakeLists.txt @@ -123,7 +123,8 @@ if(APPLE) endif() target_link_libraries(RockboxUtility rbbase cutelogger gitversion - Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia) + Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia + Qt${QT_VERSION_MAJOR}::Svg) target_include_directories(RockboxUtility PRIVATE ${CMAKE_CURRENT_LIST_DIR}/gui diff --git a/utils/rbutilqt/rbutilqt.cpp b/utils/rbutilqt/rbutilqt.cpp index aa405418be..271d252391 100644 --- a/utils/rbutilqt/rbutilqt.cpp +++ b/utils/rbutilqt/rbutilqt.cpp @@ -88,6 +88,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) ui.setupUi(this); QIcon windowIcon(":/icons/rockbox-clef.svg"); this->setWindowIcon(windowIcon); + ui.logoLabel->load(QLatin1String(":/icons/rockbox-logo.svg")); #if defined(Q_OS_MACX) // don't translate menu entries that are handled specially on OS X // (Configure, Quit). Qt handles them for us if they use english string. diff --git a/utils/rbutilqt/rbutilqtfrm.ui b/utils/rbutilqt/rbutilqtfrm.ui index af47fea72c..5c78c812a8 100644 --- a/utils/rbutilqt/rbutilqtfrm.ui +++ b/utils/rbutilqt/rbutilqtfrm.ui @@ -6,8 +6,8 @@ 0 0 - 650 - 399 + 631 + 441 @@ -19,8 +19,8 @@ - - + + 200 @@ -39,21 +39,15 @@ 62 - - - - - :/icons/rockbox-logo.svg + + Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox. - - true - - - Qt::AlignCenter + + Rockbox Logo - + @@ -74,7 +68,7 @@ - :/icons/rockbox-32.png + :/icons/rockbox-32.png false @@ -159,7 +153,7 @@ - + 0 @@ -384,8 +378,8 @@ 0 0 - 650 - 22 + 631 + 30 @@ -632,6 +626,14 @@ + + + QSvgWidget + QWidget +
QSvgWidget
+ 1 +
+
tabWidget buttonChangeDevice -- cgit v1.2.3