* CharacterView now accepts mouse wheel input (it did not forward the messages
to its superclass), and it also sets useful scroller steps. * Improved layout a bit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29817 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -166,6 +166,7 @@ CharacterView::MouseMoved(BPoint where, uint32 transit,
|
|||||||
void
|
void
|
||||||
CharacterView::MessageReceived(BMessage* message)
|
CharacterView::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
|
BView::MessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -303,11 +304,13 @@ CharacterView::_UpdateSize()
|
|||||||
} else {
|
} else {
|
||||||
scroller->SetRange(0.0f, fDataRect.Height() - bounds.Height() - 1.0f);
|
scroller->SetRange(0.0f, fDataRect.Height() - bounds.Height() - 1.0f);
|
||||||
scroller->SetProportion(bounds.Height () / fDataRect.Height());
|
scroller->SetProportion(bounds.Height () / fDataRect.Height());
|
||||||
|
scroller->SetSteps(fCharacterHeight,
|
||||||
|
Bounds().Height() - fCharacterHeight);
|
||||||
|
|
||||||
// scroll up if there is empty room on bottom
|
// scroll up if there is empty room on bottom
|
||||||
if (fDataRect.Height() < bounds.bottom) {
|
if (fDataRect.Height() < bounds.bottom)
|
||||||
ScrollBy(0.0f, bounds.bottom - fDataRect.Height());
|
ScrollBy(0.0f, bounds.bottom - fDataRect.Height());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,11 +120,12 @@ CharacterWindow::CharacterWindow()
|
|||||||
|
|
||||||
AddChild(BGroupLayoutBuilder(B_VERTICAL)
|
AddChild(BGroupLayoutBuilder(B_VERTICAL)
|
||||||
.Add(menuBar)
|
.Add(menuBar)
|
||||||
.Add(BGroupLayoutBuilder()//BSplitLayoutBuilder()
|
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 10)//BSplitLayoutBuilder()
|
||||||
.Add(unicodeScroller)
|
.Add(unicodeScroller)
|
||||||
.Add(BGroupLayoutBuilder(B_VERTICAL)
|
.Add(BGroupLayoutBuilder(B_VERTICAL, 10)
|
||||||
.Add(characterScroller)
|
.Add(characterScroller)
|
||||||
.Add(fFontSizeSlider))));
|
.Add(fFontSizeSlider))
|
||||||
|
.SetInsets(10, 10, 10, 10)));
|
||||||
|
|
||||||
// Add menu
|
// Add menu
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user