Merge branch 'bug_538_ignore_global_actions_in_standby'
[enigma2.git] / lib / gui / epositiongauge.cpp
index a7608b7addcd4a57b70b81969c48d94aed031688..ff98c080835532c4565558bb35254616b2673839 100644 (file)
@@ -43,6 +43,11 @@ void ePositionGauge::setInColor(const gRGB &color)
        invalidate();
 }
 
+void ePositionGauge::setPointer(int which, ePtr<gPixmap> &pixmap, const ePoint &center)
+{
+       setPointer(which, pixmap.operator->(), center);
+}
+
 void ePositionGauge::setPointer(int which, gPixmap *pixmap, const ePoint &center)
 {
        if (which == 0)
@@ -121,13 +126,17 @@ int ePositionGauge::event(int event, void *data, void *data2)
                                        continue;
                                } else if (i->what == 1) /* out */
                                        out = i++->where;
-                               else /* mark */
+                               else if (i->what == 2) /* mark */
                                {
                                        int xm = scale(i->where);
                                        painter.setForegroundColor(gRGB(0xFF8080));
                                        painter.fill(eRect(xm - 2, 0, 4, s.height()));
                                        i++;
                                        continue;
+                               } else /* other marker, like last position */
+                               {
+                                       ++i;
+                                       continue;
                                }
                        }
                        
@@ -135,7 +144,7 @@ int ePositionGauge::event(int event, void *data, void *data2)
                        {
                                painter.setForegroundColor(gRGB(m_foreground_color));
                                int xi = scale(in), xo = scale(out);
-                               painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+                               painter.fill(eRect(xi, (s.height()-4) / 2, xo-xi, 4));
                        }
                        
                        in = m_length;