* Added a (to be virtual) DefaultItemSpacing() method to control look. This is

what you should use in for example BGroupLayout as spacing/inset.
* Changed the label spacing to be dependent on the font size, too (and enlarged
  it a bit as well).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33621 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-10-17 17:01:22 +00:00
parent 1c9ae94636
commit 20a11271d0
2 changed files with 12 additions and 1 deletions
+4
View File
@@ -72,6 +72,10 @@ public:
virtual BAlignment DefaultLabelAlignment() const;
virtual float DefaultLabelSpacing() const;
/* TODO: virtual*/
float DefaultItemSpacing() const;
uint32 Flags(BControl* control) const;
virtual void DrawButtonFrame(BView* view, BRect& rect,
+8 -1
View File
@@ -39,7 +39,14 @@ BControlLook::DefaultLabelAlignment() const
float
BControlLook::DefaultLabelSpacing() const
{
return 4.0;//ceilf(be_plain_font->Size() / 4.0);
return ceilf(be_plain_font->Size() / 2.0);
}
float
BControlLook::DefaultItemSpacing() const
{
return ceilf(be_plain_font->Size() * 0.85);
}