Tracker: Removed extra border next to the draggable icon.
* Also removed extraneous call to BMenuBar::SetBorder(); B_BORDER_FRAME is the default, anyway.
This commit is contained in:
@@ -440,7 +440,8 @@ DraggableContainerIcon::Draw(BRect updateRect)
|
|||||||
rgb_color base = ui_color(B_MENU_BACKGROUND_COLOR);
|
rgb_color base = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||||
be_control_look->DrawBorder(this, rect, updateRect, base, B_PLAIN_BORDER,
|
be_control_look->DrawBorder(this, rect, updateRect, base, B_PLAIN_BORDER,
|
||||||
0, BControlLook::B_BOTTOM_BORDER);
|
0, BControlLook::B_BOTTOM_BORDER);
|
||||||
be_control_look->DrawMenuBarBackground(this, rect, updateRect, base);
|
be_control_look->DrawMenuBarBackground(this, rect, updateRect, base, 0,
|
||||||
|
BControlLook::B_ALL_BORDERS & ~BControlLook::B_LEFT_BORDER);
|
||||||
|
|
||||||
// Draw the icon, straddling the border
|
// Draw the icon, straddling the border
|
||||||
SetDrawingMode(B_OP_ALPHA);
|
SetDrawingMode(B_OP_ALPHA);
|
||||||
@@ -869,7 +870,6 @@ BContainerWindow::Init(const BMessage* message)
|
|||||||
|
|
||||||
if (ShouldAddMenus()) {
|
if (ShouldAddMenus()) {
|
||||||
fMenuBar = new BMenuBar("MenuBar");
|
fMenuBar = new BMenuBar("MenuBar");
|
||||||
fMenuBar->SetBorder(B_BORDER_FRAME);
|
|
||||||
fMenuContainer->GroupLayout()->AddView(fMenuBar);
|
fMenuContainer->GroupLayout()->AddView(fMenuBar);
|
||||||
AddMenus();
|
AddMenus();
|
||||||
|
|
||||||
@@ -3275,14 +3275,15 @@ BContainerWindow::_AddFolderIcon()
|
|||||||
if (iconSize < 16)
|
if (iconSize < 16)
|
||||||
iconSize = 16;
|
iconSize = 16;
|
||||||
|
|
||||||
fDraggableIcon = new(std::nothrow)
|
fDraggableIcon = new(std::nothrow) DraggableContainerIcon();
|
||||||
DraggableContainerIcon;
|
|
||||||
|
|
||||||
if (fDraggableIcon != NULL) {
|
if (fDraggableIcon != NULL) {
|
||||||
BLayoutItem* item =
|
BLayoutItem* item = fMenuContainer->GroupLayout()->AddView(
|
||||||
fMenuContainer->GroupLayout()->AddView(fDraggableIcon);
|
fDraggableIcon);
|
||||||
item->SetExplicitMinSize(BSize(iconSize + 5, iconSize));
|
item->SetExplicitMinSize(BSize(iconSize + 5, iconSize));
|
||||||
item->SetExplicitMaxSize(BSize(iconSize + 5, item->MaxSize().Height()));
|
item->SetExplicitMaxSize(BSize(iconSize + 5, item->MaxSize().Height()));
|
||||||
|
|
||||||
|
fMenuBar->SetBorders(
|
||||||
|
BControlLook::B_ALL_BORDERS & ~BControlLook::B_RIGHT_BORDER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user