From e9dcd87490222bb5d363954ea58914c2f9a16f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 9 Feb 2004 03:05:49 +0000 Subject: [PATCH] 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 --- src/apps/showimage/ShowImageWindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index 0ec5f3315d..394b58e762 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -105,16 +105,17 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref, const BMessenger& tracke fSlideShowDelay = NULL; LoadSettings(); - + // 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); + AddChild(fBar); BRect viewFrame = Bounds(); - viewFrame.top = fBar->Bounds().bottom; - viewFrame.right -= B_V_SCROLL_BAR_WIDTH; - viewFrame.bottom -= B_H_SCROLL_BAR_HEIGHT; - + viewFrame.top = fBar->Bounds().Height() + 1; + viewFrame.right -= B_V_SCROLL_BAR_WIDTH; + viewFrame.bottom -= B_H_SCROLL_BAR_HEIGHT; + // create the image view fImageView = new ShowImageView(viewFrame, "image_view", B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE | B_PULSE_NEEDED); @@ -122,7 +123,6 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref, const BMessenger& tracke BScrollView *pscrollView = new BScrollView("image_scroller", fImageView, B_FOLLOW_ALL, 0, false, false, B_PLAIN_BORDER); AddChild(pscrollView); - AddChild(fBar); const int32 kstatusWidth = 190; BRect rect;