mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 12:37:23 +00:00
Cache group view geometry -- speed up instance view by caching sizes of stuff
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <QListView>
|
||||
#include <QLineEdit>
|
||||
#include <QScrollBar>
|
||||
#include <QCache>
|
||||
|
||||
struct GroupViewRoles
|
||||
{
|
||||
@@ -128,6 +129,7 @@ private: /* variables */
|
||||
QItemSelectionModel::SelectionFlag m_ctrlDragSelectionFlag;
|
||||
QPoint m_lastDragPosition;
|
||||
int m_spacing = 5;
|
||||
QCache<int, QRect> geometryCache;
|
||||
|
||||
private: /* methods */
|
||||
QPair<int, int> categoryInternalPosition(const QModelIndex &index) const;
|
||||
|
||||
Reference in New Issue
Block a user