Fix BTabView bug which caused {Min,Max,Preferred}Size() to be at least 3 pixels too tall, depending on the border in use. Also a very small style fix. This fixes ticket #6544.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40138 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1111,7 +1111,7 @@ BTabView::MinSize()
|
|||||||
size = _TabsMinSize();
|
size = _TabsMinSize();
|
||||||
BSize containerSize = fContainerView->MinSize();
|
BSize containerSize = fContainerView->MinSize();
|
||||||
containerSize.width += 2 * _BorderWidth();
|
containerSize.width += 2 * _BorderWidth();
|
||||||
containerSize.height += _BorderWidth();
|
containerSize.height += 2 * _BorderWidth();
|
||||||
if (containerSize.width > size.width)
|
if (containerSize.width > size.width)
|
||||||
size.width = containerSize.width;
|
size.width = containerSize.width;
|
||||||
size.height += containerSize.height;
|
size.height += containerSize.height;
|
||||||
@@ -1130,7 +1130,7 @@ BTabView::MaxSize()
|
|||||||
size = _TabsMinSize();
|
size = _TabsMinSize();
|
||||||
BSize containerSize = fContainerView->MaxSize();
|
BSize containerSize = fContainerView->MaxSize();
|
||||||
containerSize.width += 2 * _BorderWidth();
|
containerSize.width += 2 * _BorderWidth();
|
||||||
containerSize.height += _BorderWidth();
|
containerSize.height += 2 * _BorderWidth();
|
||||||
if (containerSize.width > size.width)
|
if (containerSize.width > size.width)
|
||||||
size.width = containerSize.width;
|
size.width = containerSize.width;
|
||||||
size.height += containerSize.height;
|
size.height += containerSize.height;
|
||||||
@@ -1149,7 +1149,7 @@ BTabView::PreferredSize()
|
|||||||
size = _TabsMinSize();
|
size = _TabsMinSize();
|
||||||
BSize containerSize = fContainerView->PreferredSize();
|
BSize containerSize = fContainerView->PreferredSize();
|
||||||
containerSize.width += 2 * _BorderWidth();
|
containerSize.width += 2 * _BorderWidth();
|
||||||
containerSize.height += _BorderWidth();
|
containerSize.height += 2 * _BorderWidth();
|
||||||
if (containerSize.width > size.width)
|
if (containerSize.width > size.width)
|
||||||
size.width = containerSize.width;
|
size.width = containerSize.width;
|
||||||
size.height += containerSize.height;
|
size.height += containerSize.height;
|
||||||
@@ -1184,8 +1184,7 @@ BTabView::ResolveSpecifier(BMessage *message, int32 index,
|
|||||||
if (propInfo.FindMatch(message, 0, specifier, what, property) >= B_OK)
|
if (propInfo.FindMatch(message, 0, specifier, what, property) >= B_OK)
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
return BView::ResolveSpecifier(message, index, specifier, what,
|
return BView::ResolveSpecifier(message, index, specifier, what, property);
|
||||||
property);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1409,7 +1408,7 @@ BTabView::_InitContainerView(bool layouted)
|
|||||||
BSize
|
BSize
|
||||||
BTabView::_TabsMinSize() const
|
BTabView::_TabsMinSize() const
|
||||||
{
|
{
|
||||||
BSize size(0.0f, TabHeight() + 6.0f);
|
BSize size(0.0f, TabHeight());
|
||||||
int32 count = min_c(2, CountTabs());
|
int32 count = min_c(2, CountTabs());
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
BRect frame = TabFrame(i);
|
BRect frame = TabFrame(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user