Commit 54290ad9 authored by Scott Petrovic's avatar Scott Petrovic
Browse files

add asterisk to preset names if they are in a tweaked state. This should help...

add asterisk to preset names if they are in a tweaked state. This should help in a details view if the icon is smaller
parent 026bda94
...@@ -99,7 +99,13 @@ void KisPresetDelegate::paint(QPainter * painter, const QStyleOptionViewItem & o ...@@ -99,7 +99,13 @@ void KisPresetDelegate::paint(QPainter * painter, const QStyleOptionViewItem & o
painter->drawImage(paintRect.x(), paintRect.y(), painter->drawImage(paintRect.x(), paintRect.y(),
preview.scaled(pixSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)); preview.scaled(pixSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
painter->drawText(pixSize.width() + 10, option.rect.y() + option.rect.height() - 10, preset->name()); // Put an asterisk after the preset if it is dirty. This will help in case the pixmap icon is too small
QString dirtyPresetIndicator = QString("");
if (m_useDirtyPresets && preset->isPresetDirty()) {
dirtyPresetIndicator = QString("*");
}
painter->drawText(pixSize.width() + 10, option.rect.y() + option.rect.height() - 10, preset->name().append(dirtyPresetIndicator));
} }
if (m_useDirtyPresets && preset->isPresetDirty()) { if (m_useDirtyPresets && preset->isPresetDirty()) {
const QIcon icon = KisIconUtils::loadIcon(koIconName("dirty-preset")); const QIcon icon = KisIconUtils::loadIcon(koIconName("dirty-preset"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment