* 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:
Axel Dörfler
2009-03-31 12:51:50 +00:00
parent 6722e2f797
commit f05dab29fd
2 changed files with 9 additions and 5 deletions
+5 -2
View File
@@ -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();
+4 -3
View File
@@ -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