Fixed calculation of the menu bar height and the position of the views below.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6543 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-02-09 03:05:49 +00:00
parent 94261db3a6
commit e9dcd87490
+3 -3
View File
@@ -107,11 +107,12 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref, const BMessenger& tracke
LoadSettings(); LoadSettings();
// create menu bar // create menu bar
fBar = new BMenuBar(BRect(0, 0, Bounds().right, 20), "menu_bar"); fBar = new BMenuBar(BRect(0, 0, Bounds().right, 1), "menu_bar");
LoadMenus(fBar); LoadMenus(fBar);
AddChild(fBar);
BRect viewFrame = Bounds(); BRect viewFrame = Bounds();
viewFrame.top = fBar->Bounds().bottom; viewFrame.top = fBar->Bounds().Height() + 1;
viewFrame.right -= B_V_SCROLL_BAR_WIDTH; viewFrame.right -= B_V_SCROLL_BAR_WIDTH;
viewFrame.bottom -= B_H_SCROLL_BAR_HEIGHT; viewFrame.bottom -= B_H_SCROLL_BAR_HEIGHT;
@@ -122,7 +123,6 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref, const BMessenger& tracke
BScrollView *pscrollView = new BScrollView("image_scroller", fImageView, BScrollView *pscrollView = new BScrollView("image_scroller", fImageView,
B_FOLLOW_ALL, 0, false, false, B_PLAIN_BORDER); B_FOLLOW_ALL, 0, false, false, B_PLAIN_BORDER);
AddChild(pscrollView); AddChild(pscrollView);
AddChild(fBar);
const int32 kstatusWidth = 190; const int32 kstatusWidth = 190;
BRect rect; BRect rect;