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); | BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(this, frame, be_control_look->DrawButtonBackground(this, frame,
updateRect, base, BControlLook::B_ACTIVATED); updateRect, base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2; tint *= 1.2;
} else { } else {
SetHighColor(base); SetHighColor(base);
@@ -502,8 +503,6 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
// Find group // Find group
fFindCloseButton = new CloseButton(new BMessage(EDIT_HIDE_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:"), "", fFindTextControl = new BTextControl("find", B_TRANSLATE("Find:"), "",
new BMessage(EDIT_FIND_NEXT)); new BMessage(EDIT_FIND_NEXT));
fFindTextControl->SetModificationMessage(new BMessage(FIND_TEXT_CHANGED)); fFindTextControl->SetModificationMessage(new BMessage(FIND_TEXT_CHANGED));
+7 -7
View File
@@ -584,13 +584,10 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
fOverCloseRect = overCloseRect; fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect); ContainerView()->Invalidate(closeRect);
} }
// Set the Tooltip }
if (overCloseRect)
fController->SetToolTip(B_TRANSLATE("Close tab")); // Set the tool tip
else fController->SetToolTip(Label());
fController->SetToolTip(Label());
} else
fController->SetToolTip(Label());
TabView::MouseMoved(where, transit, dragMessage); TabView::MouseMoved(where, transit, dragMessage);
} }
@@ -640,15 +637,18 @@ void WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
tint *= 1.2; tint *= 1.2;
if (fClicked && fOverCloseRect) { if (fClicked && fOverCloseRect) {
// Draw the button frame
BRect buttonRect(closeRect.InsetByCopy(-4, -4)); BRect buttonRect(closeRect.InsetByCopy(-4, -4));
be_control_look->DrawButtonFrame(owner, buttonRect, updateRect, be_control_look->DrawButtonFrame(owner, buttonRect, updateRect,
base, base, base, base,
BControlLook::B_ACTIVATED | BControlLook::B_BLEND_FRAME); BControlLook::B_ACTIVATED | BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(owner, buttonRect, updateRect, be_control_look->DrawButtonBackground(owner, buttonRect, updateRect,
base, BControlLook::B_ACTIVATED); base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2; tint *= 1.2;
} }
// Draw the ×
base = tint_color(base, tint); base = tint_color(base, tint);
owner->SetHighColor(base); owner->SetHighColor(base);
owner->SetPenSize(2); owner->SetPenSize(2);