Adjusted menu bar, scrollbars and view frame so that there are no longer double borders
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -109,10 +109,9 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref)
|
|||||||
// 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, 20), "menu_bar");
|
||||||
LoadMenus(fBar);
|
LoadMenus(fBar);
|
||||||
AddChild(fBar);
|
|
||||||
|
|
||||||
BRect viewFrame = Bounds();
|
BRect viewFrame = Bounds();
|
||||||
viewFrame.top = fBar->Bounds().bottom + 1;
|
viewFrame.top = fBar->Bounds().bottom;
|
||||||
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;
|
||||||
|
|
||||||
@@ -123,13 +122,15 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref)
|
|||||||
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;
|
||||||
rect = Bounds();
|
rect = Bounds();
|
||||||
rect.top = viewFrame.bottom + 1;
|
rect.top = viewFrame.bottom + 1;
|
||||||
rect.left = viewFrame.left + kstatusWidth;
|
rect.left = viewFrame.left + kstatusWidth;
|
||||||
rect.right = viewFrame.right;
|
rect.right = viewFrame.right + 1;
|
||||||
|
rect.bottom += 1;
|
||||||
BScrollBar *phscroll;
|
BScrollBar *phscroll;
|
||||||
phscroll = new BScrollBar(rect, "hscroll", fImageView, 0, 150,
|
phscroll = new BScrollBar(rect, "hscroll", fImageView, 0, 150,
|
||||||
B_HORIZONTAL);
|
B_HORIZONTAL);
|
||||||
@@ -143,9 +144,10 @@ ShowImageWindow::ShowImageWindow(const entry_ref *pref)
|
|||||||
AddChild(fStatusView);
|
AddChild(fStatusView);
|
||||||
|
|
||||||
rect = Bounds();
|
rect = Bounds();
|
||||||
rect.top = viewFrame.top;
|
rect.top = viewFrame.top - 1;
|
||||||
rect.left = viewFrame.right + 1;
|
rect.left = viewFrame.right + 1;
|
||||||
rect.bottom = viewFrame.bottom;
|
rect.bottom = viewFrame.bottom + 1;
|
||||||
|
rect.right += 1;
|
||||||
BScrollBar *pvscroll;
|
BScrollBar *pvscroll;
|
||||||
pvscroll = new BScrollBar(rect, "vscroll", fImageView, 0, 150, B_VERTICAL);
|
pvscroll = new BScrollBar(rect, "vscroll", fImageView, 0, 150, B_VERTICAL);
|
||||||
AddChild(pvscroll);
|
AddChild(pvscroll);
|
||||||
|
|||||||
Reference in New Issue
Block a user