Add tooltips for close tab and close find bar

This commit is contained in:
John Scipione 2013-02-17 20:26:33 -05:00
parent 8848aa106a
commit cdb4abbd18
3 changed files with 18 additions and 4 deletions

View File

@ -252,6 +252,11 @@ public:
SetExplicitMaxSize(BSize(15, 15));
}
virtual void AttachedToWindow()
{
SetToolTip(B_TRANSLATE("Close find bar"));
}
virtual void Draw(BRect updateRect)
{
BRect frame = Bounds();

View File

@ -74,5 +74,5 @@ Application WebPositive :
DoCatalogs WebPositive :
x-vnd.Haiku-WebPositive
:
$(sources)
$(sources)
;

View File

@ -36,6 +36,7 @@
#include <Button.h>
#include <CardLayout.h>
#include <ControlLook.h>
#include <Catalog.h>
#include <GroupView.h>
#include <MenuBar.h>
#include <MenuItem.h>
@ -48,6 +49,10 @@
#include "TabView.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Tab Manager"
const static BString kEmptyString;
@ -579,9 +584,13 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect);
}
}
fController->SetToolTip(Label());
// Set the Tooltip
if (overCloseRect)
fController->SetToolTip(B_TRANSLATE("Close tab"));
else
fController->SetToolTip(Label());
} else
fController->SetToolTip(Label());
TabView::MouseMoved(where, transit, dragMessage);
}