Tracker: BPoseView replace BView with _inherited and style fixes.
Change-Id: Ic24f4ee3831a94a659cc584e5b4393f08695061d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9889
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Diff
src/kits/tracker/PoseView.cpp | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
@@ -997,14 +997,12 @@
{
AdoptSystemColors();
AddFilter(new ShortcutFilter(B_RETURN, B_OPTION_KEY, kOpenSelection,
this));
AddFilter(new ShortcutFilter(B_RETURN, B_OPTION_KEY, kOpenSelection, this));
AddFilter(new ShortcutFilter(B_ESCAPE, 0, B_CANCEL, this));
AddFilter(new ShortcutFilter(B_ESCAPE, B_SHIFT_KEY,
kCancelSelectionToClipboard, this));
AddFilter(new ShortcutFilter(B_ESCAPE, B_SHIFT_KEY, kCancelSelectionToClipboard, this));
@@ -1024,7 +1022,7 @@
FSClipboardStartWatch(this);
BView::AttachedToWindow();
_inherited::AttachedToWindow();
}
@@ -1717,7 +1715,7 @@
BRect bounds(Bounds());
float lastItemTop = (CurrentPoseList()->CountItems() - 1) * fListElemHeight;
if (bounds.top > lastItemTop)
BView::ScrollTo(bounds.left, std::max(lastItemTop, 0.0f));
_inherited::ScrollTo(bounds.left, std::max(lastItemTop, 0.0f));
}
}
@@ -2722,8 +2720,7 @@
bool sortFolderNamesFirst;
if (message->FindBool("SortFolderNamesFirst",
&sortFolderNamesFirst) == B_OK) {
settings.SetSortFolderNamesFirst(
sortFolderNamesFirst);
settings.SetSortFolderNamesFirst(sortFolderNamesFirst);
}
NameAttributeText::SetSortFolderNamesFirst(
settings.SortFolderNamesFirst());
@@ -7622,9 +7619,9 @@
BPoint offset;
dragBitmap = MakeDragBitmap(dragRect, where, index, offset);
if (dragBitmap != NULL)
BView::DragMessage(&message, dragBitmap, B_OP_ALPHA, offset);
_inherited::DragMessage(&message, dragBitmap, B_OP_ALPHA, offset);
else
BView::DragMessage(&message, dragRect);
_inherited::DragMessage(&message, dragRect);
fAutoScrollState = kWaitForTransition;
@@ -8111,7 +8108,7 @@
if (pose == NULL && bounds.top > 0) {
BView::ScrollTo(bounds.left, std::max(bounds.top - fListElemHeight, 0.0f));
_inherited::ScrollTo(bounds.left, std::max(bounds.top - fListElemHeight, 0.0f));
}
}
}
@@ -9167,7 +9164,7 @@
if ((Flags() & B_DRAW_ON_CHILDREN) == 0)
DrawAfterChildren(updateRect);
BView::Draw(updateRect);
_inherited::Draw(updateRect);
}
@@ -10440,12 +10437,12 @@
BPose* pose = fFilteredPoseList->LastItem();
if (pose == NULL)
BView::ScrollTo(0, 0);
_inherited::ScrollTo(0, 0);
else {
BRect bounds = Bounds();
float height = fFilteredPoseList->CountItems() * fListElemHeight;
if (bounds.top > 0 && bounds.bottom > height)
BView::ScrollTo(0, std::max(height - bounds.Height(), 0.0f));
_inherited::ScrollTo(0, std::max(height - bounds.Height(), 0.0f));
}
UpdateScrollRange();