Add tooltips for close tab and close find bar
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -74,5 +74,5 @@ Application WebPositive :
|
|||||||
DoCatalogs WebPositive :
|
DoCatalogs WebPositive :
|
||||||
x-vnd.Haiku-WebPositive
|
x-vnd.Haiku-WebPositive
|
||||||
:
|
:
|
||||||
$(sources)
|
$(sources)
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user