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
+5
View File
@@ -252,6 +252,11 @@ public:
SetExplicitMaxSize(BSize(15, 15)); SetExplicitMaxSize(BSize(15, 15));
} }
virtual void AttachedToWindow()
{
SetToolTip(B_TRANSLATE("Close find bar"));
}
virtual void Draw(BRect updateRect) virtual void Draw(BRect updateRect)
{ {
BRect frame = Bounds(); BRect frame = Bounds();
+1 -1
View File
@@ -74,5 +74,5 @@ Application WebPositive :
DoCatalogs WebPositive : DoCatalogs WebPositive :
x-vnd.Haiku-WebPositive x-vnd.Haiku-WebPositive
: :
$(sources) $(sources)
; ;
+12 -3
View File
@@ -36,6 +36,7 @@
#include <Button.h> #include <Button.h>
#include <CardLayout.h> #include <CardLayout.h>
#include <ControlLook.h> #include <ControlLook.h>
#include <Catalog.h>
#include <GroupView.h> #include <GroupView.h>
#include <MenuBar.h> #include <MenuBar.h>
#include <MenuItem.h> #include <MenuItem.h>
@@ -48,6 +49,10 @@
#include "TabView.h" #include "TabView.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Tab Manager"
const static BString kEmptyString; const static BString kEmptyString;
@@ -579,9 +584,13 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
fOverCloseRect = overCloseRect; fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect); ContainerView()->Invalidate(closeRect);
} }
} // Set the Tooltip
if (overCloseRect)
fController->SetToolTip(Label()); fController->SetToolTip(B_TRANSLATE("Close tab"));
else
fController->SetToolTip(Label());
} else
fController->SetToolTip(Label());
TabView::MouseMoved(where, transit, dragMessage); TabView::MouseMoved(where, transit, dragMessage);
} }