WebPositive close x fixes.

* Remove the Close tab and Close find bar tooltips.
* Offset the x again.
* Add some comments.
This commit is contained in:
John Scipione
2013-02-20 21:46:04 -05:00
parent 52266c1de7
commit fff103f567
2 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -271,6 +271,7 @@ public:
| BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(this, frame,
updateRect, base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2;
} else {
SetHighColor(base);
@@ -502,8 +503,6 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
// Find group
fFindCloseButton = new CloseButton(new BMessage(EDIT_HIDE_FIND_GROUP));
fFindCloseButton->SetToolTip(B_TRANSLATE_COMMENT("Close find bar",
"find bar close button tooltip"));
fFindTextControl = new BTextControl("find", B_TRANSLATE("Find:"), "",
new BMessage(EDIT_FIND_NEXT));
fFindTextControl->SetModificationMessage(new BMessage(FIND_TEXT_CHANGED));
+7 -7
View File
@@ -584,13 +584,10 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect);
}
// Set the Tooltip
if (overCloseRect)
fController->SetToolTip(B_TRANSLATE("Close tab"));
else
fController->SetToolTip(Label());
} else
fController->SetToolTip(Label());
}
// Set the tool tip
fController->SetToolTip(Label());
TabView::MouseMoved(where, transit, dragMessage);
}
@@ -640,15 +637,18 @@ void WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
tint *= 1.2;
if (fClicked && fOverCloseRect) {
// Draw the button frame
BRect buttonRect(closeRect.InsetByCopy(-4, -4));
be_control_look->DrawButtonFrame(owner, buttonRect, updateRect,
base, base,
BControlLook::B_ACTIVATED | BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(owner, buttonRect, updateRect,
base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2;
}
// Draw the ×
base = tint_color(base, tint);
owner->SetHighColor(base);
owner->SetPenSize(2);