Add inset and spacing to BALMLayout. Each Area is able to overwrite this global values and use his own inset. Add spacing and inset to the tests.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38792 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2010-09-23 00:53:33 +00:00
parent 3ccba98ce3
commit 96e2013e70
6 changed files with 92 additions and 32 deletions
+10 -1
View File
@@ -28,7 +28,7 @@ namespace BALM {
*/
class BALMLayout : public BAbstractLayout {
public:
BALMLayout();
BALMLayout(float spacing = 0.0f);
virtual ~BALMLayout();
XTab* AddXTab();
@@ -65,6 +65,12 @@ public:
LinearSpec* Solver();
void SetInset(float inset);
float Inset();
void SetSpacing(float spacing);
float Spacing();
private:
void _SolveLayout();
@@ -86,6 +92,9 @@ private:
BSize fMaxSize;
BSize fPreferredSize;
char* fPerformancePath;
float fInset;
float fSpacing;
};
} // namespace BALM
+3 -4
View File
@@ -93,6 +93,7 @@ private:
private:
BLayoutItem* fLayoutItem;
LinearSpec* fLS;
XTab* fLeft;
@@ -106,10 +107,8 @@ private:
BSize fShrinkPenalties;
BSize fGrowPenalties;
int32 fLeftInset;
int32 fTopInset;
int32 fRightInset;
int32 fBottomInset;
BSize fTopLeftInset;
BSize fRightBottomInset;
BList fConstraints;
Constraint* fMinContentWidth;