MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / scrollTo

Method scrollTo

launcher/ui/instanceview/InstanceView.cpp:983–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981}
982
983void InstanceView::scrollTo(const QModelIndex& index, ScrollHint hint)
984{
985 if (!index.isValid())
986 return;
987
988 const QRect rect = visualRect(index);
989 if (hint == EnsureVisible && viewport()->rect().contains(rect)) {
990 viewport()->update(rect);
991 return;
992 }
993
994 verticalScrollBar()->setValue(verticalScrollToValue(index, rect, hint));
995}
996
997int InstanceView::verticalScrollToValue([[maybe_unused]] const QModelIndex& index, const QRect& rect, QListView::ScrollHint hint) const
998{

Callers 5

VersionSelectWidgetMethod · 0.80
selectCurrentMethod · 0.80
selectRecommendedMethod · 0.80
delayed_scrollMethod · 0.80
delayed_scrollMethod · 0.80

Calls 5

rectMethod · 0.80
setValueMethod · 0.80
isValidMethod · 0.45
containsMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected