From 07ce63458bccb9d01abdcb94874ffc6f9b7fdbe1 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 8 Apr 2005 11:07:30 +0000 Subject: [PATCH] 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 --- src/kits/interface/ChannelSlider.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/ChannelSlider.cpp b/src/kits/interface/ChannelSlider.cpp index d6749a77bd..11c927ca12 100644 --- a/src/kits/interface/ChannelSlider.cpp +++ b/src/kits/interface/ChannelSlider.cpp @@ -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(); }