* Fixed some regressions I introduced. The video is now correctly layouted

again. Bute this commit seems to make the old bug that some parts of the GUI
  are black much more likely. Will look into it tomorrow.
* The calculations to move the window wholy into the screen frame were buggy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34120 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-11-18 23:25:02 +00:00
parent 46776004f7
commit e337e55fdd
3 changed files with 46 additions and 33 deletions
+11 -2
View File
@@ -218,6 +218,9 @@ MainWin::MainWin(bool isFirstWindow)
AddShortcut('y', B_COMMAND_KEY, new BMessage(B_UNDO));
AddShortcut('z', B_COMMAND_KEY | B_SHIFT_KEY, new BMessage(B_REDO));
AddShortcut('y', B_COMMAND_KEY | B_SHIFT_KEY, new BMessage(B_REDO));
Hide();
Show();
}
@@ -384,6 +387,9 @@ MainWin::MessageReceived(BMessage* msg)
_RefsReceived(msg);
}
break;
case M_OPEN_PREVIOUS_PLAYLIST:
OpenPlaylist(msg);
break;
case B_UNDO:
case B_REDO:
@@ -765,6 +771,9 @@ MainWin::OpenPlaylist(const BMessage* playlistArchive)
playlistLocker.Unlock();
playlistArchive->FindInt64("position", (int64*)&fInitialSeekPosition);
if (IsHidden())
Show();
}
@@ -1305,9 +1314,9 @@ MainWin::_ResizeWindow(int percent, bool useNoVideoWidth, bool stayOnScreen)
else if (frame.right > screenFrame.right)
offsetX = (int)(screenFrame.right - frame.right);
if (frame.top < screenFrame.top)
offsetX = (int)(screenFrame.top - frame.top);
offsetY = (int)(screenFrame.top - frame.top);
else if (frame.bottom > screenFrame.bottom)
offsetX = (int)(screenFrame.bottom - frame.bottom);
offsetY = (int)(screenFrame.bottom - frame.bottom);
MoveBy(offsetX, offsetY);
}
}