Removed the BSize(const BRect&) constructor and added BRect::Size()
instead. Also added a BRect(BPoint, BSize) constructor. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21120 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -167,7 +167,7 @@ BCardLayout::LayoutView()
|
||||
{
|
||||
_ValidateMinMax();
|
||||
|
||||
BSize size = BSize(View()->Bounds());
|
||||
BSize size = View()->Bounds().Size();
|
||||
size.width = max_c(size.width, fMin.width);
|
||||
size.height = max_c(size.height, fMin.height);
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ BSplitLayout::LayoutView()
|
||||
_ValidateMinMax();
|
||||
|
||||
// layout the elements
|
||||
BSize size = _SubtractInsets(BSize(View()->Bounds()));
|
||||
BSize size = _SubtractInsets(View()->Bounds().Size());
|
||||
fHorizontalLayouter->Layout(fHorizontalLayoutInfo, size.width);
|
||||
|
||||
Layouter* verticalLayouter;
|
||||
@@ -562,7 +562,7 @@ BSplitLayout::StartDraggingSplitter(BPoint point)
|
||||
return false;
|
||||
|
||||
// Things shouldn't be draggable, if we have a >= max layout.
|
||||
BSize size = _SubtractInsets(BSize(View()->Frame()));
|
||||
BSize size = _SubtractInsets(View()->Frame().Size());
|
||||
if (fOrientation == B_HORIZONTAL && size.width >= fMax.width
|
||||
|| fOrientation == B_VERTICAL && size.height >= fMax.height) {
|
||||
return false;
|
||||
@@ -757,7 +757,7 @@ BSplitLayout::_LayoutItem(BLayoutItem* item, BRect frame, bool visible)
|
||||
info->max = item->MaxSize();
|
||||
|
||||
if (item->HasHeightForWidth()) {
|
||||
BSize size = _SubtractInsets(BSize(View()->Frame()));
|
||||
BSize size = _SubtractInsets(View()->Frame().Size());
|
||||
float minHeight, maxHeight;
|
||||
item->GetHeightForWidth(size.width, &minHeight, &maxHeight, NULL);
|
||||
info->min.height = max_c(info->min.height, minHeight);
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
#ifndef _SPLIT_LAYOUT_H
|
||||
#define _SPLIT_LAYOUT_H
|
||||
|
||||
|
||||
#include <Layout.h>
|
||||
#include <Point.h>
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
namespace Layout {
|
||||
|
||||
@@ -341,7 +341,7 @@ BTwoDimensionalLayout::LayoutView()
|
||||
_ValidateMinMax();
|
||||
|
||||
// layout the horizontal/vertical elements
|
||||
BSize size = SubtractInsets(BSize(View()->Frame()));
|
||||
BSize size = SubtractInsets(View()->Frame().Size());
|
||||
printf("BTwoDimensionalLayout::LayoutView(%p): size: (%.1f, %.1f)\n",
|
||||
View(), size.width, size.height);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user