aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/epositiongauge.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-07-20 14:48:33 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-07-20 14:48:33 +0000
commitec648cb137f7a02e63752b54be2ce3ac959c7c86 (patch)
tree9cb6cf17cc4dbeb7d4b717fad977ea72cb6859dc /lib/gui/epositiongauge.cpp
parent3c91232d1ade05d5b7bd393ec41c1673c80b8f45 (diff)
downloadenigma2-ec648cb137f7a02e63752b54be2ce3ac959c7c86.tar.gz
enigma2-ec648cb137f7a02e63752b54be2ce3ac959c7c86.zip
don't display track when no foreground is set in position gauge
Diffstat (limited to 'lib/gui/epositiongauge.cpp')
-rw-r--r--lib/gui/epositiongauge.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp
index 012fd87b..712bf4a6 100644
--- a/lib/gui/epositiongauge.cpp
+++ b/lib/gui/epositiongauge.cpp
@@ -8,6 +8,7 @@ ePositionGauge::ePositionGauge(eWidget *parent)
m_point_widget->setAlphatest(1);
m_position = 0;
m_length = 0;
+ m_have_foreground_color = 0;
}
ePositionGauge::~ePositionGauge()
@@ -117,18 +118,26 @@ int ePositionGauge::event(int event, void *data, void *data2)
}
}
- painter.setForegroundColor(gRGB(0x225b7395));
- int xi = scale(in), xo = scale(out);
- painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+ if (m_have_foreground_color)
+ {
+ painter.setForegroundColor(gRGB(m_foreground_color));
+ int xi = scale(in), xo = scale(out);
+ painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+ }
+
in = m_length;
if (i == m_cue_entries.end())
break;
}
// painter.setForegroundColor(gRGB(0x00000000));
- painter.setForegroundColor(gRGB(0x225b7395));
- painter.fill(eRect(s.width() - 2, 2, s.width() - 1, s.height() - 4));
- painter.fill(eRect(0, 2, 2, s.height() - 4));
+
+ if (m_have_foreground_color)
+ {
+ painter.setForegroundColor(gRGB(0x225b7395));
+ painter.fill(eRect(s.width() - 2, 2, s.width() - 1, s.height() - 4));
+ painter.fill(eRect(0, 2, 2, s.height() - 4));
+ }
#if 0
// border
@@ -166,3 +175,13 @@ int ePositionGauge::scale(const pts_t &val)
return width * val / m_length;
}
+
+void ePositionGauge::setForegroundColor(const gRGB &col)
+{
+ if ((!m_have_foreground_color) || !(m_foreground_color == col))
+ {
+ m_foreground_color = col;
+ m_have_foreground_color = 1;
+ invalidate();
+ }
+}