Small changes, nothing important
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15942 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fc3a8a1c73
commit
b5cd88a5c7
@ -228,31 +228,28 @@ _BMCMenuBar_::FrameResized(float width, float height)
|
||||
{
|
||||
// we need to take care of resizing and cleaning up
|
||||
// the parent menu field
|
||||
BMenuField* menuField = dynamic_cast<BMenuField*>(Parent());
|
||||
if (menuField) {
|
||||
float diff = Frame().right - menuField->Bounds().right;
|
||||
if (Window()) {
|
||||
if (diff > 0) {
|
||||
// clean up the dirty right top corner of
|
||||
// the menu field when enlarging
|
||||
BRect dirty(menuField->Bounds());
|
||||
dirty.left = dirty.right - 2;
|
||||
dirty.bottom = Frame().top - 1;
|
||||
menuField->Invalidate(dirty);
|
||||
} else if (diff < 0) {
|
||||
// clean up the dirty right line of
|
||||
// the menu field when shrinking
|
||||
BRect dirty(menuField->Bounds());
|
||||
dirty.left = dirty.right + diff + 1;
|
||||
dirty.right = dirty.left + 1;
|
||||
menuField->Invalidate(dirty);
|
||||
}
|
||||
float diff = Frame().right - fMenuField->Bounds().right;
|
||||
if (Window()) {
|
||||
if (diff > 0) {
|
||||
// clean up the dirty right top corner of
|
||||
// the menu field when enlarging
|
||||
BRect dirty(fMenuField->Bounds());
|
||||
dirty.left = dirty.right - 2;
|
||||
dirty.bottom = Frame().top - 1;
|
||||
fMenuField->Invalidate(dirty);
|
||||
} else if (diff < 0) {
|
||||
// clean up the dirty right line of
|
||||
// the menu field when shrinking
|
||||
BRect dirty(fMenuField->Bounds());
|
||||
dirty.left = dirty.right + diff + 1;
|
||||
dirty.right = dirty.left + 1;
|
||||
fMenuField->Invalidate(dirty);
|
||||
}
|
||||
// we have been shrinked or enlarged and need to take
|
||||
// of the size of the parent menu field as well
|
||||
// NOTE: no worries about follow mode, we follow left and top
|
||||
menuField->ResizeBy(diff + 2, 0.0);
|
||||
}
|
||||
// we have been shrinked or enlarged and need to take
|
||||
// of the size of the parent menu field as well
|
||||
// NOTE: no worries about follow mode, we follow left and top
|
||||
fMenuField->ResizeBy(diff + 2, 0.0);
|
||||
BMenuBar::FrameResized(width, height);
|
||||
}
|
||||
|
||||
|
@ -625,6 +625,7 @@ BMenuItem::DrawMarkSymbol()
|
||||
fSuper->SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR),
|
||||
B_DARKEN_4_TINT));
|
||||
|
||||
fSuper->BeginLineArray(4);
|
||||
fSuper->StrokeLine(BPoint(fBounds.left + 6.0f, fBounds.bottom - 4.0f),
|
||||
BPoint(fBounds.left + 10.0f, fBounds.bottom - 13.0f));
|
||||
fSuper->StrokeLine(BPoint(fBounds.left + 5.0f, fBounds.bottom - 4.0f),
|
||||
@ -633,6 +634,7 @@ BMenuItem::DrawMarkSymbol()
|
||||
BPoint(fBounds.left + 3.0f, fBounds.bottom - 9.0f));
|
||||
fSuper->StrokeLine(BPoint(fBounds.left + 4.0f, fBounds.bottom - 4.0f),
|
||||
BPoint(fBounds.left + 2.0f, fBounds.bottom - 9.0f));
|
||||
fSuper->EndLineArray();
|
||||
|
||||
fSuper->SetDrawingMode(B_OP_COPY);
|
||||
}
|
||||
|
@ -157,12 +157,12 @@ BOptionPopUp::AddOptionAt(const char *name, int32 value, int32 index)
|
||||
|
||||
BMessage *message = MakeValueMessage(value);
|
||||
if (message == NULL)
|
||||
return B_ERROR; // TODO: Should return B_NO_MEMORY instead ?
|
||||
return B_NO_MEMORY;
|
||||
|
||||
BMenuItem *newItem = new BMenuItem(name, message);
|
||||
if (newItem == NULL) {
|
||||
delete message;
|
||||
return B_ERROR; // TODO: same as above
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
|
||||
menu->AddItem(newItem, index);
|
||||
@ -355,7 +355,7 @@ BOptionPopUp::BOptionPopUp(const BOptionPopUp &clone)
|
||||
BOptionPopUp &
|
||||
BOptionPopUp::operator=(const BOptionPopUp & clone)
|
||||
{
|
||||
return *this;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user