Since the window now starts hidden for a brief moment, calling IsHidden() on
the views in the FrameResized() hook which does the layout had some unanticipated results. We need to know relative to the views themselves. This fixes the video view being visible despite audio-only content. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34129 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
98df5c0e73
commit
25fcb499b4
@ -157,7 +157,7 @@ MainWin::MainWin(bool isFirstWindow)
|
||||
// background
|
||||
fBackground = new BView(rect, "background", B_FOLLOW_ALL,
|
||||
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE);
|
||||
fBackground->SetViewColor(0,0,0);
|
||||
fBackground->SetViewColor(0, 0, 0);
|
||||
AddChild(fBackground);
|
||||
|
||||
// menu
|
||||
@ -184,10 +184,6 @@ MainWin::MainWin(bool isFirstWindow)
|
||||
fControlsHeight = (int)fControls->Frame().Height() + 1;
|
||||
fControlsWidth = (int)fControls->Frame().Width() + 1;
|
||||
fControls->SetResizingMode(B_FOLLOW_BOTTOM | B_FOLLOW_LEFT_RIGHT);
|
||||
// fControls->MoveTo(0, fBackground->Bounds().bottom - fControlsHeight + 1);
|
||||
|
||||
// fVideoView->ResizeTo(fBackground->Bounds().Width(),
|
||||
// fBackground->Bounds().Height() - fMenuBarHeight - fControlsHeight);
|
||||
|
||||
fPlaylist->AddListener(fPlaylistObserver);
|
||||
fController->SetVideoView(fVideoView);
|
||||
@ -196,10 +192,6 @@ MainWin::MainWin(bool isFirstWindow)
|
||||
peakView->SetPeakNotificationWhat(MSG_PEAK_NOTIFICATION);
|
||||
fController->SetPeakListener(peakView);
|
||||
|
||||
// printf("fMenuBarHeight %d\n", fMenuBarHeight);
|
||||
// printf("fControlsHeight %d\n", fControlsHeight);
|
||||
// printf("fControlsWidth %d\n", fControlsWidth);
|
||||
|
||||
_SetupWindow();
|
||||
|
||||
// setup the playlist window now, we need to have it
|
||||
@ -286,33 +278,33 @@ MainWin::FrameResized(float newWidth, float newHeight)
|
||||
int y = 0;
|
||||
|
||||
if (noMenu) {
|
||||
if (!fMenuBar->IsHidden())
|
||||
if (!fMenuBar->IsHidden(fMenuBar))
|
||||
fMenuBar->Hide();
|
||||
} else {
|
||||
fMenuBar->MoveTo(0, y);
|
||||
fMenuBar->ResizeTo(newWidth, fMenuBarHeight - 1);
|
||||
if (fMenuBar->IsHidden())
|
||||
if (fMenuBar->IsHidden(fMenuBar))
|
||||
fMenuBar->Show();
|
||||
y += fMenuBarHeight;
|
||||
}
|
||||
|
||||
if (maxVideoHeight == 0) {
|
||||
if (!fVideoView->IsHidden())
|
||||
if (!fVideoView->IsHidden(fVideoView))
|
||||
fVideoView->Hide();
|
||||
} else {
|
||||
_ResizeVideoView(0, y, maxVideoWidth, maxVideoHeight);
|
||||
if (fVideoView->IsHidden())
|
||||
if (fVideoView->IsHidden(fVideoView))
|
||||
fVideoView->Show();
|
||||
y += maxVideoHeight;
|
||||
}
|
||||
|
||||
if (noControls) {
|
||||
if (!fControls->IsHidden())
|
||||
if (!fControls->IsHidden(fControls))
|
||||
fControls->Hide();
|
||||
} else {
|
||||
fControls->MoveTo(0, y);
|
||||
fControls->ResizeTo(newWidth, fControlsHeight - 1);
|
||||
if (fControls->IsHidden())
|
||||
if (fControls->IsHidden(fControls))
|
||||
fControls->Show();
|
||||
// y += fControlsHeight;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user