mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
added a QStyledItemDelegate to the list QListView in EmptyFolderWidget to center aling folders' names
This commit is contained in:
21
YACReaderLibrary/empty_label_widget.cpp
Normal file
21
YACReaderLibrary/empty_label_widget.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "empty_label_widget.h"
|
||||
|
||||
EmptyLabelWidget::EmptyLabelWidget(QWidget *parent) :
|
||||
EmptyContainerInfo(parent)
|
||||
{
|
||||
setUpDefaultLayout(true);
|
||||
|
||||
iconLabel->setPixmap(QPixmap(":/images/empty_label.png"));
|
||||
|
||||
//titleLabel->setText(tr("This label doesn't contain comics yet") + QString("<p style='color:rgb(150,150,150);font-size:14px;font-weight:normal;'>%1</p>").arg(tr("Drag and drop folders and comics here")));
|
||||
titleLabel->setText(tr("This label doesn't contain comics yet"));
|
||||
}
|
||||
|
||||
void EmptyLabelWidget::setColor(YACReader::LabelColors color)
|
||||
{
|
||||
QPixmap p(":/images/empty_label.png");
|
||||
QImage img = p.toImage().convertToFormat(QImage::Format_ARGB32);
|
||||
QColor destColor(YACReader::labelColorToRGBString(color));
|
||||
YACReader::colorize(img,destColor);
|
||||
iconLabel->setPixmap(QPixmap::fromImage(img));
|
||||
}
|
Reference in New Issue
Block a user