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:
@@ -105,16 +105,17 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref, const BMessenger& tracke
|
|||||||
fSlideShowDelay = NULL;
|
fSlideShowDelay = NULL;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
// create the image view
|
// create the image view
|
||||||
fImageView = new ShowImageView(viewFrame, "image_view", B_FOLLOW_ALL,
|
fImageView = new ShowImageView(viewFrame, "image_view", B_FOLLOW_ALL,
|
||||||
B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE | B_PULSE_NEEDED);
|
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,
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user