diff --git a/headers/libs/alm/Area.h b/headers/libs/alm/Area.h index c9b1cabc6e..d8df750c6d 100644 --- a/headers/libs/alm/Area.h +++ b/headers/libs/alm/Area.h @@ -86,14 +86,14 @@ public: void SetShrinkPenalties(BSize shrink); void SetGrowPenalties(BSize grow); - int32 LeftInset() const; - int32 TopInset() const; - int32 RightInset() const; - int32 BottomInset() const; - void SetLeftInset(int32 left); - void SetTopInset(int32 top); - void SetRightInset(int32 right); - void SetBottomInset(int32 bottom); + float LeftInset() const; + float TopInset() const; + float RightInset() const; + float BottomInset() const; + void SetLeftInset(float left); + void SetTopInset(float top); + void SetRightInset(float right); + void SetBottomInset(float bottom); operator BString() const; void GetString(BString& string) const; diff --git a/src/libs/alm/ALMLayout.cpp b/src/libs/alm/ALMLayout.cpp index 10a996cd83..400808bf16 100644 --- a/src/libs/alm/ALMLayout.cpp +++ b/src/libs/alm/ALMLayout.cpp @@ -277,7 +277,7 @@ BALMLayout::_ParseGroupItem(GroupItem& item, XTab* left, YTab* top, XTab* right, else { for (unsigned int i = 0; i < item.GroupItems().size(); i++) { GroupItem& current = const_cast( - item.GroupItems().at(i)); + item.GroupItems()[i]); if (item.Orientation() == B_HORIZONTAL) { XTab* r = (i == item.GroupItems().size() - 1) ? right : AddXTab(); @@ -417,7 +417,7 @@ bool BALMLayout::AddItem(int32 index, BLayoutItem* item) { if (!item) - return NULL; + return false; // simply add the item at the upper right corner of the previous item // TODO maybe find a more elegant solution diff --git a/src/libs/alm/Area.cpp b/src/libs/alm/Area.cpp index 22778bcba3..e8770c0b14 100644 --- a/src/libs/alm/Area.cpp +++ b/src/libs/alm/Area.cpp @@ -368,7 +368,7 @@ Area::SetContentAspectRatio(double ratio) /** * Gets left inset between area and its content. */ -int32 +float Area::LeftInset() const { if (fTopLeftInset.IsWidthSet()) @@ -384,7 +384,7 @@ Area::LeftInset() const /** * Gets top inset between area and its content. */ -int32 +float Area::TopInset() const { if (fTopLeftInset.IsHeightSet()) @@ -400,7 +400,7 @@ Area::TopInset() const /** * Gets right inset between area and its content. */ -int32 +float Area::RightInset() const { if (fRightBottomInset.IsWidthSet()) @@ -416,7 +416,7 @@ Area::RightInset() const /** * Gets bottom inset between area and its content. */ -int32 +float Area::BottomInset() const { if (fRightBottomInset.IsHeightSet()) @@ -433,7 +433,7 @@ Area::BottomInset() const * Sets left inset between area and its content. */ void -Area::SetLeftInset(int32 left) +Area::SetLeftInset(float left) { fTopLeftInset.width = left; fLayoutItem->Layout()->InvalidateLayout(); @@ -444,7 +444,7 @@ Area::SetLeftInset(int32 left) * Sets top inset between area and its content. */ void -Area::SetTopInset(int32 top) +Area::SetTopInset(float top) { fTopLeftInset.height = top; fLayoutItem->Layout()->InvalidateLayout(); @@ -455,7 +455,7 @@ Area::SetTopInset(int32 top) * Sets right inset between area and its content. */ void -Area::SetRightInset(int32 right) +Area::SetRightInset(float right) { fRightBottomInset.width = right; fLayoutItem->Layout()->InvalidateLayout(); @@ -466,7 +466,7 @@ Area::SetRightInset(int32 right) * Sets bottom inset between area and its content. */ void -Area::SetBottomInset(int32 bottom) +Area::SetBottomInset(float bottom) { fRightBottomInset.height = bottom; fLayoutItem->Layout()->InvalidateLayout();