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:
@@ -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));
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user