Show paperclip in name area when not enough room in number area.
authorlittlesat <littlesat99@yahoo.com>
Sat, 15 Aug 2015 07:54:36 +0000 (09:54 +0200)
committerlittlesat <littlesat99@yahoo.com>
Sat, 15 Aug 2015 07:54:36 +0000 (09:54 +0200)
E.g. when channel numbers were not shown you do  not see the marker
(paperclip) png.

lib/service/listboxservice.cpp

index cf4aff1..f9afd2d 100644 (file)
@@ -966,12 +966,17 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
                                if (pixmap)
                                {
                                        eSize pixmap_size = pixmap->size();
-                                       eRect area = m_element_position[e == celFolderPixmap ? celServiceName: celServiceNumber];
-                                       int correction = (area.height() - pixmap_size.height()) / 2;
-                                       if (e == celFolderPixmap)
+                                       eRect area;
+                                       if (e == celFolderPixmap || m_element_position[celServiceNumber].width() < pixmap_size.width())
+                                       {
+                                               area = m_element_position[celServiceName];
                                                if (m_element_position[celServiceEventProgressbar].left() == 0)
                                                        area.setLeft(0);
-                                               xoffset = pixmap_size.width() + m_items_distances;
+                                               xoffset = pixmap_size.width() + m_items_distances;                      
+                                       }
+                                       else
+                                               area = m_element_position[celServiceNumber];
+                                       int correction = (area.height() - pixmap_size.height()) / 2;
                                        area.moveBy(offset);
                                        painter.clip(area);
                                        painter.blit(pixmap, ePoint(area.left(), offset.y() + correction), area, gPainter::BT_ALPHATEST);