mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
no more color highlight on sidebar icons ^_^
This commit is contained in:
parent
c870d9b99e
commit
e82d7e889f
@ -54,7 +54,7 @@
|
||||
#include "folder.h"
|
||||
#include "db_helper.h"
|
||||
#include "qnaturalsorting.h"
|
||||
|
||||
#include "yacreader_global.h"
|
||||
#include "QsLog.h"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
@ -161,9 +161,9 @@ QVariant FolderModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
#else
|
||||
if(item->data(FolderModel::Finished).toBool())
|
||||
return QVariant(QIcon(":/images/folder_finished.png"));
|
||||
return QVariant(YACReader::noHighlightedIcon(":/images/folder_finished.png"));
|
||||
else
|
||||
return QVariant(QIcon(":/images/folder.png"));
|
||||
return QVariant(YACReader::noHighlightedIcon(":/images/folder.png"));
|
||||
#endif
|
||||
|
||||
if (role != Qt::DisplayRole)
|
||||
|
@ -34,7 +34,7 @@ QIcon SpecialListItem::getIcon() const
|
||||
if(itemData.count()>1)
|
||||
{
|
||||
QString id = itemData.at(1).toString();
|
||||
return QIcon(QString(":/images/lists/default_%1.png").arg(id));
|
||||
return YACReader::noHighlightedIcon(QString(":/images/lists/default_%1.png").arg(id));
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ QIcon LabelItem::getIcon() const
|
||||
if(itemData.count()>1)
|
||||
{
|
||||
QString color = itemData.at(1).toString();
|
||||
return QIcon(QString(":/images/lists/label_%1.png").arg(color).toLower());
|
||||
return YACReader::noHighlightedIcon(QString(":/images/lists/label_%1.png").arg(color).toLower());
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,9 +95,9 @@ ReadingListItem::ReadingListItem(const QList<QVariant> &data, ReadingListItem *p
|
||||
QIcon ReadingListItem::getIcon() const
|
||||
{
|
||||
if(parent == 0)
|
||||
return QIcon(":/images/lists/list.png");
|
||||
return YACReader::noHighlightedIcon(":/images/lists/list.png");
|
||||
else
|
||||
return QIcon(":/images/folder.png");
|
||||
return YACReader::noHighlightedIcon(":/images/folder.png");
|
||||
}
|
||||
|
||||
int ReadingListItem::childCount() const
|
||||
|
@ -58,3 +58,13 @@ QString YACReader::colorToName(LabelColors colors)
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QIcon YACReader::noHighlightedIcon(const QString &path)
|
||||
{
|
||||
QPixmap p(path);
|
||||
QIcon icon;
|
||||
icon.addPixmap(p,QIcon::Normal);
|
||||
icon.addPixmap(p,QIcon::Selected);
|
||||
return icon;
|
||||
}
|
||||
|
@ -131,6 +131,7 @@ QString getSettingsPath();
|
||||
void addSperator(QWidget * w);
|
||||
QAction * createSeparator();
|
||||
QString colorToName(LabelColors colors);
|
||||
QIcon noHighlightedIcon(const QString & path);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user