summaryrefslogtreecommitdiff
path: root/textwindow.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-04-13 11:23:48 +0200
committerlouis <louis.braun@gmx.de>2013-04-13 11:23:48 +0200
commita2634c22a33ae5db9add1533c34a6636fde24859 (patch)
tree88f02d8f3e8c1880fad08013e74b8d979bf83729 /textwindow.c
parent1a865cc274a167ef5df7846e840acaafdc8a56f1 (diff)
downloadskin-nopacity-a2634c22a33ae5db9add1533c34a6636fde24859.tar.gz
skin-nopacity-a2634c22a33ae5db9add1533c34a6636fde24859.tar.bz2
fixed another small bug in auto scaling
Diffstat (limited to 'textwindow.c')
-rw-r--r--textwindow.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/textwindow.c b/textwindow.c
index 5b5a911..acb5c34 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -6,7 +6,6 @@ cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin)
this->vidWin = vidWin;
pixmapBackground = NULL;
pixmap = NULL;
- oldVidWinHeight = 0;
scaledWindow = false;
}
@@ -22,8 +21,12 @@ cNopacityTextWindow::~cNopacityTextWindow(void) {
osd->DestroyPixmap(pixmap);
pixmap = NULL;
}
- if ((config.scalePicture == 2) && scaledWindow)
- vidWin->SetHeight(oldVidWinHeight);
+ if ((config.scalePicture == 2) && scaledWindow) {
+ vidWin->SetX(oldVidWin.X());
+ vidWin->SetY(oldVidWin.Y());
+ vidWin->SetWidth(oldVidWin.Width());
+ vidWin->SetHeight(oldVidWin.Height());
+ }
}
bool cNopacityTextWindow::CreatePixmap(int border) {
@@ -70,8 +73,11 @@ 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());
+ oldVidWin.SetX(vidWin->X());
+ oldVidWin.SetY(vidWin->Y());
+ oldVidWin.SetWidth(vidWin->Width());
+ oldVidWin.SetHeight(vidWin->Height());
cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(availableRect);
vidWin->SetHeight(vidWinNew.Height());
scaledWindow = true;