mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 00:58:32 -04:00
Use theme for choosing the right folder icon in reading lists.
This commit is contained in:
parent
797d7aa723
commit
d2c92c0c2d
@ -1,6 +1,8 @@
|
|||||||
#include "reading_list_item.h"
|
#include "reading_list_item.h"
|
||||||
#include "qnaturalsorting.h"
|
#include "qnaturalsorting.h"
|
||||||
|
|
||||||
|
#include "theme.h"
|
||||||
|
|
||||||
#include <QFileIconProvider>
|
#include <QFileIconProvider>
|
||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
@ -126,12 +128,12 @@ QIcon ReadingListItem::getIcon() const
|
|||||||
{
|
{
|
||||||
if (parent->getId() == 0)
|
if (parent->getId() == 0)
|
||||||
return YACReader::noHighlightedIcon(":/images/lists/list.png"); //top level list
|
return YACReader::noHighlightedIcon(":/images/lists/list.png"); //top level list
|
||||||
else
|
else {
|
||||||
#ifdef Q_OS_MAC
|
if(Theme::currentTheme().useNativeFolderIcons)
|
||||||
return QFileIconProvider().icon(QFileIconProvider::Folder);
|
return QFileIconProvider().icon(QFileIconProvider::Folder);
|
||||||
#else
|
else
|
||||||
return YACReader::noHighlightedIcon(":/images/sidebar/folder.png"); //sublist
|
return YACReader::noHighlightedIcon(":/images/sidebar/folder.png"); //sublist
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ReadingListItem::childCount() const
|
int ReadingListItem::childCount() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user