r20339 by fschmid - Replace colored Masterpage names by icons indicating the color.
scribus-commit
scribus-commit at lists.scribus.net
Tue Aug 18 08:55:47 UTC 2015
Author: fschmid
Date: Tue Aug 18 08:55:46 2015
New Revision: 20339
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20339
Log:
Replace colored Masterpage names by icons indicating the color.
Modified:
trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
trunk/Scribus/scribus/ui/pagepalette_pages.cpp
Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20339&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp Tue Aug 18 08:55:46 2015
@@ -499,7 +499,9 @@
mpItem->setFlags(mpItem->flags() &= ~Qt::ItemIsEditable);
}
mpItem->setData(Qt::UserRole, it.key());
- mpItem->setForeground(m_doc->MasterPages.at(it.value())->getMarkColor());
+ QPixmap pm(16, 16);
+ pm.fill(m_doc->MasterPages.at(it.value())->getMarkColor());
+ mpItem->setIcon(pm);
masterPageListBox->addItem(mpItem);
}
deleteButton->setEnabled(m_doc->MasterNames.count() == 1 ? false : true);
Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20339&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp Tue Aug 18 08:55:46 2015
@@ -205,7 +205,9 @@
else
item = new QListWidgetItem(pageLabel, masterPageList);
item->setData(Qt::UserRole, pageName);
- item->setForeground(currView->Doc->MasterPages.at(it.value())->getMarkColor());
+ QPixmap pm(16, 16);
+ pm.fill(currView->Doc->MasterPages.at(it.value())->getMarkColor());
+ item->setIcon(pm);
}
}
More information about the scribus-commit
mailing list