+ if (paintProgress && evt)
+ {
+ eRect area = m_element_position[celServiceEventProgressbar];
+ if (!selected && m_color_set[serviceEventProgressbarBorderColor])
+ painter.setForegroundColor(m_color[serviceEventProgressbarBorderColor]);
+ else if (selected && m_color_set[serviceEventProgressbarBorderColorSelected])
+ painter.setForegroundColor(m_color[serviceEventProgressbarBorderColorSelected]);
+
+ int border = 1;
+ int progressH = 6;
+ int progressX = area.left() + offset.x();
+ int progressW = area.width() - 2 * border;
+ int progressT = offset.y() + (m_itemsize.height() - progressH - 2*border) / 2;
+
+ // paint progressbar frame
+ painter.fill(eRect(progressX, progressT, area.width(), border));
+ painter.fill(eRect(progressX, progressT + border, border, progressH));
+ painter.fill(eRect(progressX, progressT + progressH + border, area.width(), border));
+ painter.fill(eRect(progressX + area.width() - border, progressT + border, border, progressH));
+
+ // calculate value
+ time_t now = time(0);
+ int value = progressW * (now - evt->getBeginTime()) / evt->getDuration();
+
+ eRect tmp = eRect(progressX + border, progressT + border, value, progressH);
+ ePtr<gPixmap> &pixmap = m_pixmaps[picServiceEventProgressbar];
+ if (pixmap)
+ {
+ area.moveBy(offset);
+ painter.clip(area);
+ painter.blit(pixmap, ePoint(progressX + border, progressT + border), tmp, gPainter::BT_ALPHATEST);
+ painter.clippop();
+ }
+ else
+ {
+ if (!selected && m_color_set[serviceEventProgressbarColor])
+ painter.setForegroundColor(m_color[serviceEventProgressbarColor]);
+ else if (selected && m_color_set[serviceEventProgressbarColorSelected])
+ painter.setForegroundColor(m_color[serviceEventProgressbarColorSelected]);
+ painter.fill(tmp);
+ }
+ }