⛏️ index : haiku.git

author John Scipione <jscipione@gmail.com> 2025-11-16 14:16:12.0 -05:00:00
committer John Scipione <jscipione@gmail.com> 2025-11-30 19:05:25.0 +00:00:00
commit
1584b1ecaba938c2cc82f5de7b6dd79f0c9e23a5 [patch]
tree
643def79b19e62b37ef8ce7b8924e465f170967d
parent
0e2e36f650d709f2d70375ea753b05122aec1629
download
1584b1ecaba938c2cc82f5de7b6dd79f0c9e23a5.tar.gz

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(-)

diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 1a524c5..519548e 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -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));
		// add Option-Return as a shortcut filter because AddShortcut
		// doesn't allow us to have shortcuts without Command yet
	AddFilter(new ShortcutFilter(B_ESCAPE, 0, B_CANCEL, this));
		// Escape key, used to abort an on-going clipboard cut or filtering
	AddFilter(new ShortcutFilter(B_ESCAPE, B_SHIFT_KEY,
		kCancelSelectionToClipboard, this));
	AddFilter(new ShortcutFilter(B_ESCAPE, B_SHIFT_KEY, kCancelSelectionToClipboard, this));
		// Escape + SHIFT will remove current selection from clipboard,
		// or all poses from current folder if 0 selected

@@ -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);

	// turn on auto scrolling
	fAutoScrollState = kWaitForTransition;
@@ -8111,7 +8108,7 @@

				if (pose == NULL && bounds.top > 0) {
					// scroll up a little
					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();