mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
added folders status assets to MacOSX version
This commit is contained in:
parent
ef53174255
commit
789257f0e3
@ -56,6 +56,7 @@
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QFileIconProvider>
|
||||
QIcon finishedFolderIcon;
|
||||
#endif
|
||||
|
||||
#define ROOT 1
|
||||
@ -109,8 +110,22 @@ QVariant TreeModel::data(const QModelIndex &index, int role) const
|
||||
TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
|
||||
|
||||
if (role == Qt::DecorationRole)
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
return QVariant(QFileIconProvider().icon(QFileIconProvider::Folder)); //TODO draw a tick on top when it is needed
|
||||
if(item->data(TreeModel::Finished).toBool()){
|
||||
if(finishedFolderIcon.isNull())
|
||||
{
|
||||
QIcon ico = QFileIconProvider().icon(QFileIconProvider::Folder);
|
||||
QPixmap pix = ico.pixmap(16,16);
|
||||
QPainter p(&pix);
|
||||
p.drawPixmap(4,7,QPixmap(":/images/folder_finished_macosx.png"));
|
||||
finishedFolderIcon.addPixmap(pix);
|
||||
}
|
||||
return QVariant(finishedFolderIcon);
|
||||
}
|
||||
else {
|
||||
return QVariant(QFileIconProvider().icon(QFileIconProvider::Folder));
|
||||
}
|
||||
#else
|
||||
if(item->data(TreeModel::Finished).toBool())
|
||||
return QVariant(QIcon(":/images/folder_finished.png"));
|
||||
|
@ -1,6 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file alias="images/main_toolbar/back.png">../images/main_toolbar/back_osx.png</file>
|
||||
<file>../images/main_toolbar/back_osx.png </file>
|
||||
<file alias="images/main_toolbar/back.png">../images/folder_finished_macosx.png</file>
|
||||
|
||||
<file alias="images/main_toolbar/back_disabled.png">../images/main_toolbar/back_disabled_osx.png</file>
|
||||
<file alias="images/main_toolbar/forward.png">../images/main_toolbar/forward_osx.png</file>
|
||||
<file alias="images/main_toolbar/forward_disabled.png">../images/main_toolbar/forward_disabled_osx.png</file>
|
||||
|
@ -642,7 +642,7 @@ void PropertiesDialog::save()
|
||||
edited = true;
|
||||
}
|
||||
if(comics.size()==1)
|
||||
if(itr->info.isBis != NULL || isBisCheck->isChecked())
|
||||
if(!itr->info.isBis.isNull() || isBisCheck->isChecked())
|
||||
{
|
||||
itr->info.isBis = isBisCheck->isChecked();
|
||||
edited = true;
|
||||
|
@ -65,7 +65,11 @@ void YACReaderTreeViewItemDeletegate::paint(QPainter *painter, const QStyleOptio
|
||||
if(!item->data(TreeModel::Completed).toBool())
|
||||
{
|
||||
painter->save();
|
||||
#ifdef Q_OS_MAC
|
||||
painter->setBrush(QBrush(QColor(78,150,218)));
|
||||
#else
|
||||
painter->setBrush(QBrush(QColor(237,197,24)));
|
||||
#endif
|
||||
painter->setPen(QPen(QBrush(),0));
|
||||
painter->drawRect(0,option.rect.y(),2,option.rect.height());
|
||||
painter->restore();
|
||||
|
BIN
images/folder_finished_macosx.png
Normal file
BIN
images/folder_finished_macosx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 B |
Loading…
x
Reference in New Issue
Block a user