Also hide the full screen controls when the mouse is over them.

* We just wait a little longer in this case, like 4.5s.
* Changed the code to only send the messages when needed, before they were
  being sent every 1.5s.
* However, this is untested as of yet, as the layout changes didn't allow me
  to run the MediaPlayer on my system. Will do so in a minute on another one.
This commit is contained in:
Axel Dörfler
2012-01-10 22:02:03 +01:00
parent 7dde214bc0
commit 7532547c06
3 changed files with 38 additions and 14 deletions
+13 -11
View File
@@ -975,7 +975,8 @@ MainWin::MessageReceived(BMessage* msg)
if (fIsFullscreen) {
BPoint videoViewWhere;
if (msg->FindPoint("where", &videoViewWhere) == B_OK) {
if (!fControls->Frame().Contains(videoViewWhere)) {
if (msg->FindBool("force")
|| !fControls->Frame().Contains(videoViewWhere)) {
_ShowFullscreenControls(false);
// hide the mouse cursor until the user moves it
be_app->ObscureCursor();
@@ -2333,6 +2334,7 @@ MainWin::_ShowFullscreenControls(bool show, bool animate)
return;
fShowsFullscreenControls = show;
fVideoView->SetFullscreenControlsVisible(show);
if (show) {
fControls->RemoveSelf();
@@ -2341,6 +2343,7 @@ MainWin::_ShowFullscreenControls(bool show, bool animate)
fVideoView->AddChild(fControls);
if (fScaleFullscreenControls)
fControls->SetSymbolScale(1.5f);
while (fControls->IsHidden())
fControls->Show();
}
@@ -2364,16 +2367,15 @@ MainWin::_ShowFullscreenControls(bool show, bool animate)
finalMessage.AddFloat("offset", originalY + moveDist);
finalMessage.AddBool("show", show);
PostMessage(&finalMessage, this);
} else {
if (!show) {
fControls->RemoveSelf();
fControls->MoveTo(fVideoView->Frame().left,
fVideoView->Frame().bottom + 1);
fBackground->AddChild(fControls);
fControls->SetSymbolScale(1.0f);
while (!fControls->IsHidden())
fControls->Hide();
}
} else if (!show) {
fControls->RemoveSelf();
fControls->MoveTo(fVideoView->Frame().left,
fVideoView->Frame().bottom + 1);
fBackground->AddChild(fControls);
fControls->SetSymbolScale(1.0f);
while (!fControls->IsHidden())
fControls->Hide();
}
}