diff options
-rw-r--r-- | menudetailview.c | 45 | ||||
-rw-r--r-- | menudetailview.h | 13 |
2 files changed, 1 insertions, 57 deletions
diff --git a/menudetailview.c b/menudetailview.c index a293a6d..070fc26 100644 --- a/menudetailview.c +++ b/menudetailview.c @@ -82,7 +82,7 @@ void cNopacityDetailView::SetAlpha(int Alpha) { } void cNopacityDetailView::InitiateViewType(void) { - if (!(config.GetValue("tabsInDetailView"))) { + if (!(config.GetValue("tabsInDetailView") && !(type == dvText))) { switch (type) { case dvEvent: viewLight = new cNopacityMenuDetailEventViewLight(osd, ev, scrollBar, scrollBarBack); @@ -90,9 +90,6 @@ void cNopacityDetailView::InitiateViewType(void) { case dvRecording: viewLight = new cNopacityMenuDetailRecordingViewLight(osd, rec, scrollBar, scrollBarBack); break; - case dvText: - viewLight = new cNopacityMenuDetailTextViewLight(osd, text, scrollBar, scrollBarBack); - break; default: break; } @@ -1816,43 +1813,3 @@ int cNopacityMenuDetailRecordingViewLight::ReadSizeVdr(const char *strPath) { } return dirSize; } - -//---------------cNopacityMenuDetailTextViewLight--------------------- - -cNopacityMenuDetailTextViewLight::cNopacityMenuDetailTextViewLight(cOsd *osd, const char *text, cPixmap *s, cPixmap *sBack) : cNopacityMenuDetailViewLight(osd, s, sBack) { - this->text = text; -} - -cNopacityMenuDetailTextViewLight::~cNopacityMenuDetailTextViewLight(void) { - osd->DestroyPixmap(pixmapContent); -} - -void cNopacityMenuDetailTextViewLight::SetContent(void) { - content.Set(text, font, width - 4 * border); -} - -void cNopacityMenuDetailTextViewLight::SetContentHeight(void) { - int lineHeight = font->Height(); - int linesContent = content.Lines() + 1; - - int heightContentText = linesContent * lineHeight; - if (heightContentText > contentHeight) { - contentDrawPortHeight = heightContentText; - hasScrollbar = true; - } else { - contentDrawPortHeight = contentHeight; - } -} - -void cNopacityMenuDetailTextViewLight::CreatePixmaps(void) { - contentHeight = contentHeight - border; - pixmapContent = osd->CreatePixmap(3, cRect(x, top + headerHeight + border, width, contentHeight), - cRect(0, 0, width, contentDrawPortHeight)); - - pixmapContent->Fill(clrTransparent); -} - -void cNopacityMenuDetailTextViewLight::Render(void) { - DrawTextWrapper(&content, 0); - DrawScrollbar(); -} diff --git a/menudetailview.h b/menudetailview.h index c77ef10..19567fc 100644 --- a/menudetailview.h +++ b/menudetailview.h @@ -151,17 +151,4 @@ public: void Render(void); }; -class cNopacityMenuDetailTextViewLight : public cNopacityMenuDetailViewLight { -private: - const char *text; - cTextWrapper content; -public: - cNopacityMenuDetailTextViewLight(cOsd *osd, const char *text, cPixmap *s, cPixmap *sBack); - virtual ~cNopacityMenuDetailTextViewLight(void); - void SetContent(void); - void SetContentHeight(void); - void CreatePixmaps(void); - void Render(void); -}; - #endif //__NOPACITY_MENUDETAILVIEW_H |