* Removed unused MessageReceived() method.
* Made the standard character width a bit wider. * When moving a character around, it was incorrectly centered in the bitmap (StringWidth() was called from the wrong view). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29826 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -236,8 +236,9 @@ CharacterView::MouseMoved(BPoint where, uint32 transit,
|
||||
UnicodeToUTF8(character, text, sizeof(text));
|
||||
|
||||
view->SetFont(&fCharacterFont);
|
||||
view->DrawString(text, BPoint((fCharacterWidth - StringWidth(text)) / 2,
|
||||
fCharacterBase));
|
||||
view->DrawString(text,
|
||||
BPoint((fCharacterWidth - view->StringWidth(text)) / 2,
|
||||
fCharacterBase));
|
||||
|
||||
view->Sync();
|
||||
bitmap->RemoveChild(view);
|
||||
@@ -256,13 +257,6 @@ CharacterView::MouseMoved(BPoint where, uint32 transit,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CharacterView::MessageReceived(BMessage* message)
|
||||
{
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CharacterView::Draw(BRect updateRect)
|
||||
{
|
||||
@@ -408,11 +402,11 @@ CharacterView::_UpdateSize()
|
||||
fTitleBase = (int32)ceilf(fontHeight.ascent);
|
||||
|
||||
// Find widest character
|
||||
fCharacterWidth = (int32)ceilf(fCharacterFont.StringWidth("W"));
|
||||
fCharacterWidth = (int32)ceilf(fCharacterFont.StringWidth("W") * 1.5f);
|
||||
|
||||
if (fCharacterFont.IsFullAndHalfFixed()) {
|
||||
// TODO: improve this!
|
||||
fCharacterWidth *= 2;
|
||||
fCharacterWidth = (int32)ceilf(fCharacterWidth * 1.4);
|
||||
}
|
||||
|
||||
fCharacterFont.GetHeight(&fontHeight);
|
||||
|
||||
@@ -49,8 +49,6 @@ protected:
|
||||
virtual void MouseMoved(BPoint where, uint32 transit,
|
||||
const BMessage* dragMessage);
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
virtual void Draw(BRect updateRect);
|
||||
|
||||
virtual void DoLayout();
|
||||
|
||||
Reference in New Issue
Block a user