diff options
author | louis <louis.braun@gmx.de> | 2013-04-13 10:41:51 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-04-13 10:41:51 +0200 |
commit | 91c004390c528f8abea82f0a867d4e47cd14f996 (patch) | |
tree | cf782015896fb5fd6a9951a4a0a4f8a515ce64b3 /textwindow.c | |
parent | 7aad394c1037743817e41429e2eca7bd4319dae6 (diff) | |
download | skin-nopacity-91c004390c528f8abea82f0a867d4e47cd14f996.tar.gz skin-nopacity-91c004390c528f8abea82f0a867d4e47cd14f996.tar.bz2 |
added option auto for video scaling
Diffstat (limited to 'textwindow.c')
-rw-r--r-- | textwindow.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/textwindow.c b/textwindow.c index 26e4134..c999a52 100644 --- a/textwindow.c +++ b/textwindow.c @@ -1,10 +1,12 @@ #include "textwindow.h" -cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font) { +cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin) { this->osd = osd; this->font = font; + this->vidWin = vidWin; pixmapBackground = NULL; pixmap = NULL; + oldVidWinHeight = 0; } cNopacityTextWindow::~cNopacityTextWindow(void) { @@ -19,6 +21,8 @@ cNopacityTextWindow::~cNopacityTextWindow(void) { osd->DestroyPixmap(pixmap); pixmap = NULL; } + if (config.scalePicture == 2) + vidWin->SetHeight(oldVidWinHeight); } bool cNopacityTextWindow::CreatePixmap(int border) { @@ -63,7 +67,14 @@ void cNopacityTextWindow::DoSleep(int duration) { void cNopacityTextWindow::Action(void) { DoSleep(config.menuInfoTextDelay*1000); - + + if (config.scalePicture == 2) { + oldVidWinHeight = vidWin->Height(); + cRect availableRect(vidWin->X(), vidWin->Y(), vidWin->Width(), vidWin->Height() - geometry->Height()); + cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); + vidWin->SetHeight(vidWinNew.Height()); + } + int border = 5; bool scrolling = false; if (Running()) { |