* 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
|
||||
CharacterView::MessageReceived(BMessage* message)
|
||||
{
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
|
||||
|
||||
@@ -303,10 +304,12 @@ CharacterView::_UpdateSize()
|
||||
} else {
|
||||
scroller->SetRange(0.0f, fDataRect.Height() - bounds.Height() - 1.0f);
|
||||
scroller->SetProportion(bounds.Height () / fDataRect.Height());
|
||||
scroller->SetSteps(fCharacterHeight,
|
||||
Bounds().Height() - fCharacterHeight);
|
||||
|
||||
// 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());
|
||||
}
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
|
||||
@@ -120,11 +120,12 @@ CharacterWindow::CharacterWindow()
|
||||
|
||||
AddChild(BGroupLayoutBuilder(B_VERTICAL)
|
||||
.Add(menuBar)
|
||||
.Add(BGroupLayoutBuilder()//BSplitLayoutBuilder()
|
||||
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 10)//BSplitLayoutBuilder()
|
||||
.Add(unicodeScroller)
|
||||
.Add(BGroupLayoutBuilder(B_VERTICAL)
|
||||
.Add(BGroupLayoutBuilder(B_VERTICAL, 10)
|
||||
.Add(characterScroller)
|
||||
.Add(fFontSizeSlider))));
|
||||
.Add(fFontSizeSlider))
|
||||
.SetInsets(10, 10, 10, 10)));
|
||||
|
||||
// Add menu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user