Add default spacing for Layouts (#5614)
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET * introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing(). * modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods. * default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING * I've found two regressions, patches incoming, please report others on #5614. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,7 +13,7 @@ class BGroupLayoutBuilder {
|
||||
public:
|
||||
BGroupLayoutBuilder(
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
float spacing = 0.0f);
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BGroupLayoutBuilder(BGroupLayout* layout);
|
||||
BGroupLayoutBuilder(BGroupView* view);
|
||||
|
||||
@@ -29,7 +29,8 @@ public:
|
||||
BGroupLayoutBuilder& Add(BLayoutItem* item, float weight);
|
||||
|
||||
BGroupLayoutBuilder& AddGroup(enum orientation orientation,
|
||||
float spacing = 0.0f, float weight = 1.0f);
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
BGroupLayoutBuilder& End();
|
||||
|
||||
BGroupLayoutBuilder& AddGlue(float weight = 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user