* In BeOS R5 BListItem::DrawItem frame.left is always 0 regardless of BListView origin or update rectangle. This fixes the horizontal scrolling bug in FlattenPictureTest application.
* When the list is scrolled horizontally ScrollToSelection() resets the origin x-coordinate to 0. When using the keyboard to move to the next or previous item this is not desired. Now the x-coordinate is not changed from its old value anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27328 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d9bf715495
commit
20ab5edbe9
@ -179,7 +179,7 @@ BListView::Draw(BRect updateRect)
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
BRect itemFrame(Bounds().left, 0, Bounds().right, -1);
|
||||
BRect itemFrame(0, 0, Bounds().right, -1);
|
||||
for (int i = 0; i < count; i++) {
|
||||
BListItem* item = ItemAt(i);
|
||||
itemFrame.bottom = itemFrame.top + ceilf(item->Height()) - 1;
|
||||
@ -800,9 +800,9 @@ BListView::ScrollToSelection()
|
||||
return;
|
||||
|
||||
if (itemFrame.top < Bounds().top)
|
||||
ScrollTo(0, itemFrame.top);
|
||||
ScrollTo(itemFrame.left, itemFrame.top);
|
||||
else
|
||||
ScrollTo(0, itemFrame.bottom - Bounds().Height());
|
||||
ScrollTo(itemFrame.left, itemFrame.bottom - Bounds().Height());
|
||||
}
|
||||
|
||||
|
||||
@ -1023,7 +1023,6 @@ BListView::ItemFrame(int32 index)
|
||||
frame.bottom = -1;
|
||||
} else {
|
||||
BListItem* item = ItemAt(index);
|
||||
frame.left = 0.0;
|
||||
frame.top = item->Top();
|
||||
frame.bottom = item->Bottom();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user