summaryrefslogtreecommitdiff
path: root/menudetailview.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-06-04 15:28:43 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-06-06 14:17:44 +0200
commit0ea065bf544ad07409ea782d064bb7fbef27e2f3 (patch)
treef9f2a1dfbd10bc2d3edd105ba558ee3d60932528 /menudetailview.c
parentcfde4918262c7d9ec44677d073a84cf2667a166c (diff)
downloadskin-nopacity-0ea065bf544ad07409ea782d064bb7fbef27e2f3.tar.gz
skin-nopacity-0ea065bf544ad07409ea782d064bb7fbef27e2f3.tar.bz2
Eliminate cNopacityDisplayMenuView::SetDetailViewSize() and cNopacityDetailView::SetGeometry()
All parameters defined in these functions can be set in the constructor of NopacityDetailView.
Diffstat (limited to 'menudetailview.c')
-rw-r--r--menudetailview.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/menudetailview.c b/menudetailview.c
index cb11226..26840d8 100644
--- a/menudetailview.c
+++ b/menudetailview.c
@@ -3,19 +3,36 @@
/********************************************************************************************
* cNopacityDetailView
********************************************************************************************/
-cNopacityDetailView::cNopacityDetailView(eDetailViewType detailViewType, cOsd *osd) {
+cNopacityDetailView::cNopacityDetailView(eDetailViewType detailViewType, cOsd *osd, cPixmap *s, cPixmap *sBack) {
type = detailViewType;
this->osd = osd;
+ this->scrollBar = s;
+ this->scrollBarBack = sBack;
ev = NULL;
rec = NULL;
text = NULL;
view = NULL;
- x = 0;
- width = 0;
- height = 0;
- top = 0;
- border = 0;
+ x = (config.GetValue("menuAdjustLeft")) ? 0 : geoManager->osdWidth - geoManager->menuContentWidthFull + 2 * geoManager->menuSpace;
+ width = geoManager->menuContentWidthFull - 2 * geoManager->menuSpace;
+ height = geoManager->menuContentHeight;
+ top = geoManager->menuHeaderHeight;
+ border = 30;
headerHeight = 0;
+ switch (type) {
+ case dvEvent:
+ headerHeight = config.GetValue("headerDetailedEPG") * height / 100;
+ border = config.GetValue("borderDetailedEPG");
+ break;
+ case dvRecording:
+ headerHeight = config.GetValue("headerDetailedRecordings") * height / 100;
+ border = config.GetValue("borderDetailedRecordings");
+ break;
+ case dvText:
+ headerHeight = 0;
+ break;
+ default:
+ break;
+ }
}
cNopacityDetailView::~cNopacityDetailView(void) {
@@ -26,15 +43,6 @@ cNopacityDetailView::~cNopacityDetailView(void) {
delete view;
}
-void cNopacityDetailView::SetGeometry(int x, int width, int height, int top, int contentBorder, int headerHeight) {
- this->x = x;
- this->width = width;
- this->height = height;
- this->top = top;
- this->border = contentBorder;
- this->headerHeight = headerHeight;
-}
-
void cNopacityDetailView::InitiateViewType(void) {
static cPlugin *pScraper = GetScraperPlugin();
ScraperGetEventType call;
@@ -122,12 +130,14 @@ void cNopacityDetailView::KeyInput(bool Up, bool Page) {
} else if (Up && !Page) {
bool scrolled = view->KeyUp();
if (scrolled) {
+ view->SetScrollbarPixmaps(scrollBar, scrollBarBack);
view->DrawScrollbar();
osd->Flush();
}
}else if (!Up && !Page) {
bool scrolled = view->KeyDown();
if (scrolled) {
+ view->SetScrollbarPixmaps(scrollBar, scrollBarBack);
view->DrawScrollbar();
osd->Flush();
}