diff options
Diffstat (limited to 'lib/gui')
| -rw-r--r-- | lib/gui/elistboxcontent.cpp | 3 | ||||
| -rw-r--r-- | lib/gui/epositiongauge.cpp | 22 | ||||
| -rw-r--r-- | lib/gui/esubtitle.h | 12 |
3 files changed, 25 insertions, 12 deletions
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index a19e11a3..ba0794e7 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -641,7 +641,8 @@ static ePyObject lookupColor(ePyObject color, ePyObject data) if ((icolor & 0xFF000000) == 0xFF000000) { int index = icolor & 0xFFFFFF; - eDebug("[eListboxPythonMultiContent] template color index: %d", index); + if (PyTuple_GetItem(data, index) == Py_None) + return ePyObject(); return PyTuple_GetItem(data, index); } diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index ff98c080..e45d4a6c 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -112,6 +112,7 @@ int ePositionGauge::event(int event, void *data, void *data2) // painter.fill(eRect(0, 10, s.width(), s.height()-20)); pts_t in = 0, out = 0; + int xm, xm_last = -1; std::multiset<cueEntry>::iterator i(m_cue_entries.begin()); @@ -126,17 +127,22 @@ int ePositionGauge::event(int event, void *data, void *data2) continue; } else if (i->what == 1) /* out */ out = i++->where; - else if (i->what == 2) /* mark */ + else /* mark or last */ { - int xm = scale(i->where); - painter.setForegroundColor(gRGB(0xFF8080)); - painter.fill(eRect(xm - 2, 0, 4, s.height())); + xm = scale(i->where); + if (i->what == 2) { + painter.setForegroundColor(gRGB(0xFF8080)); + if (xm - 2 < xm_last) /* Make sure last is not overdrawn */ + painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height())); + else + painter.fill(eRect(xm - 2, 0, 4, s.height())); + } else if (i->what == 3) { + painter.setForegroundColor(gRGB(0x80FF80)); + painter.fill(eRect(xm - 1, 0, 3, s.height())); + xm_last = xm + 2; + } i++; continue; - } else /* other marker, like last position */ - { - ++i; - continue; } } diff --git a/lib/gui/esubtitle.h b/lib/gui/esubtitle.h index 45345db1..cdad7286 100644 --- a/lib/gui/esubtitle.h +++ b/lib/gui/esubtitle.h @@ -23,15 +23,21 @@ struct ePangoSubtitlePageElement struct ePangoSubtitlePage { - pts_t show_pts; + pts_t m_show_pts; int m_timeout; /* in milliseconds */ std::vector<ePangoSubtitlePageElement> m_elements; void clear() { m_elements.clear(); } }; +struct eVobSubtitlePage +{ + pts_t m_show_pts; + int m_timeout; /* in milliseconds */ + ePtr<gPixmap> m_pixmap; +}; + class eDVBTeletextSubtitlePage; -class eDVBPangoSubtitlePage; -class ePangoSubtitlePage; +class eDVBSubtitlePage; class eSubtitleWidget: public eWidget, public Object { |
