Account for the fact that the visible frame of a tab is one pixel larger at
the bottom. Will fix Haiku ticket #6383 when a new package is made available. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@539 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
01abe0e23c
commit
e71c5717b1
@@ -429,9 +429,14 @@ TabContainerView::_TabAt(const BPoint& where) const
|
|||||||
BGroupLayout* layout = GroupLayout();
|
BGroupLayout* layout = GroupLayout();
|
||||||
int32 count = layout->CountItems() - 1;
|
int32 count = layout->CountItems() - 1;
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
TabLayoutItem* item = dynamic_cast<TabLayoutItem*>(
|
TabLayoutItem* item = dynamic_cast<TabLayoutItem*>(layout->ItemAt(i));
|
||||||
layout->ItemAt(i));
|
if (item == NULL || !item->IsVisible())
|
||||||
if (item && item->IsVisible() && item->Frame().Contains(where))
|
continue;
|
||||||
|
// Account for the fact that the tab frame does not contain the
|
||||||
|
// visible bottom border.
|
||||||
|
BRect frame = item->Frame();
|
||||||
|
frame.bottom++;
|
||||||
|
if (frame.Contains(where))
|
||||||
return item->Parent();
|
return item->Parent();
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user