1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-19 09:47:20 +01:00

see #2473 made text appear vertically aligned across different rule cells even when they dont have any icon, e.g. "any"

This commit is contained in:
Vadim Kurland 2011-06-04 14:25:35 -07:00
parent 99cd831b75
commit a6fda88a54

View File

@ -142,12 +142,22 @@ void RuleSetViewDelegate::drawIconAndText(QPainter *painter,
int y = rect.top();
int iconWidth = 0;
if (!icon.isEmpty() && st->getShowIconsInRules())
if (st->getShowIconsInRules())
{
QPixmap pm;
if (!icon.isEmpty()) LoadPixmap(calculateIconName(icon, negation), pm);
painter->drawPixmap(x,y,pm);
iconWidth = pm.width();
if (!icon.isEmpty())
{
QPixmap pm;
LoadPixmap(calculateIconName(icon, negation), pm);
painter->drawPixmap(x,y,pm);
iconWidth = pm.width();
} else
{
if (FWBSettings::SIZE25X25 == st->getIconsInRulesSize())
iconWidth = 25;
else
iconWidth = 16;
}
x += iconWidth + ICON_TEXT_GAP;
}