Ouch! Looks like Beos doesn't take font size into account in the various calculations. Fixing them could mean break some derived classes, but I don't think there are any. This fixes label drawing, the rest when I return from holidays.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12272 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
17ea072acb
commit
07ce63458b
@ -234,11 +234,8 @@ BChannelSlider::Draw(BRect updateRect)
|
||||
BRect bounds(Bounds());
|
||||
float labelWidth = StringWidth(Label());
|
||||
|
||||
MovePenTo((bounds.Width() - labelWidth) / 2, 10);
|
||||
DrawString(Label());
|
||||
|
||||
Sync();
|
||||
// TODO: Respect label limits !!!
|
||||
DrawString(Label(), BPoint((bounds.Width() - labelWidth) / 2, fBaseLine));
|
||||
Sync();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user