Skip to content

Commit

Permalink
Improve UX when image download is disabled
Browse files Browse the repository at this point in the history
Show placeholder picture and add full reason text as tooltip
  • Loading branch information
z3ntu committed Dec 12, 2022
1 parent 417b40c commit 776e653
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/devicelistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "razerimagedownloader.h"

#include <QFileInfo>
#include <QIcon>
#include <QLabel>
#include <QVBoxLayout>

Expand Down Expand Up @@ -55,7 +56,11 @@ void DeviceListWidget::imageDownloadErrored(QString reason, QString longReason)
qDebug() << "DeviceListWidget: Received errored signal!";
qDebug() << "DeviceListWidget: Reason:" << reason;
qDebug() << "DeviceListWidget: Long reason:" << longReason;
imageLabel->setText(reason);

setToolTip(longReason);

QPixmap placeholder = QIcon::fromTheme("folder-pictures-symbolic").pixmap(40);
imageLabel->setPixmap(placeholder);
}

libopenrazer::Device *DeviceListWidget::device()
Expand Down

0 comments on commit 776e653

Please sign in to comment.