Do not resize the VideoView to the scaled size

of the video anymore, but tell the VideoView
the video frame size. So the outside regions of
the video are also painted by the VideoView. Not
tested with overlays, but should work. The side
effect is that the controls appear along the bottom
of the screen in full-screen mode. The controls
may need to be over the video, so they cannot be
attached to the parent of the VideoView (this was
already the case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38492 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2010-09-01 13:02:30 +00:00
parent 4edcbff706
commit ee891c8828
3 changed files with 42 additions and 18 deletions
+9 -4
View File
@@ -1666,11 +1666,16 @@ MainWin::_ResizeVideoView(int x, int y, int width, int height)
if (renderHeight > height)
renderHeight = height;
int xOffset = x + (width - renderWidth) / 2;
int yOffset = y + (height - renderHeight) / 2;
int xOffset = (width - renderWidth) / 2;
int yOffset = (height - renderHeight) / 2;
fVideoView->MoveTo(xOffset, yOffset);
fVideoView->ResizeTo(renderWidth - 1, renderHeight - 1);
fVideoView->MoveTo(x, y);
fVideoView->ResizeTo(width - 1, height - 1);
BRect videoFrame(xOffset, yOffset,
xOffset + renderWidth - 1, yOffset + renderHeight - 1);
fVideoView->SetVideoFrame(videoFrame);
}