Taskbar: show 'modified' icon in icon only mode

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/266/head
Mavridis Philippe 2 years ago committed by Michele Calgaro
parent 74466041a6
commit b7d9ed80a3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -730,28 +730,36 @@ void TaskContainer::drawButton(TQPainter *p)
} }
// modified overlay icon // modified overlay icon
if (taskBar->showText())
{
static TQString modStr = "[" + i18n( "modified" ) + "]"; static TQString modStr = "[" + i18n( "modified" ) + "]";
int modStrPos = text.find( modStr ); int modStrPos = text.find( modStr );
if (modStrPos >= 0) if (modStrPos >= 0)
{
TQRect r;
TQPixmap modPixmap = SmallIcon("modified");
if (iconified)
{
TDEIconEffect::semiTransparent(modPixmap);
}
if (taskBar->showText()) // has text
{ {
// +1 because we include a space after the closing brace. // +1 because we include a space after the closing brace.
text.remove(modStrPos, modStr.length() + 1); text.remove(modStrPos, modStr.length() + 1);
TQPixmap modPixmap = SmallIcon("modified");
// draw modified overlay // draw modified overlay
if (!modPixmap.isNull()) if (!modPixmap.isNull())
{ {
TQRect r = TQStyle::visualRect(TQRect(br.x() + textPos,(height() - iconSize) / 2, iconSize, iconSize), this); r = TQStyle::visualRect(TQRect(br.x() + textPos,(height() - iconSize) / 2, iconSize, iconSize), this);
if (iconified)
{
TDEIconEffect::semiTransparent(modPixmap);
}
p->drawPixmap(r, modPixmap);
textPos += iconSize + 2; textPos += iconSize + 2;
} }
} }
else if (taskBar->showIcons()) // has only icon
{
r = TQRect(0, 0, iconSize / 2, iconSize / 2);
r.moveBottomRight(iconRect.bottomRight());
}
p->drawPixmap(r, modPixmap);
} }
} }

Loading…
Cancel
Save