Don't enforce oxygen icons for Qt-only (Linux) builds. Cehck for missing icons, and use alternatives.

NOTE: This is not 100% complete yet - still require better icons for dynamic, playlists, and others...
This commit is contained in:
craig.p.drummond
2012-09-18 18:47:25 +00:00
committed by craig.p.drummond
parent a8f540abfb
commit ee457e227c
17 changed files with 136 additions and 63 deletions

View File

@@ -162,12 +162,12 @@ void ActionItemDelegate::drawIcons(QPainter *painter, const QRect &r, bool mouse
}
if (toggle) {
QString iconName=index.data(ItemView::Role_ToggleIconName).toString();
if (!iconName.isEmpty()) {
QIcon icon=index.data(ItemView::Role_ToggleIcon).value<QIcon>();
if (!icon.isNull()) {
if (act1 || act2) {
adjustActionRect(rtl, iconMode, actionRect);
}
QPixmap pix=Icon(iconName).pixmap(QSize(constActionIconSize, constActionIconSize));
QPixmap pix=icon.pixmap(QSize(constActionIconSize, constActionIconSize));
if (!pix.isNull() && actionRect.width()>=pix.width()/* && r.x()>=0 && r.y()>=0*/) {
drawBgnd(painter, actionRect);
painter->drawPixmap(actionRect.x()+(actionRect.width()-pix.width())/2,