aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Lectem <lectem@gmail.com>2015-07-25 14:24:02 +0200
committerGravatar Lectem <lectem@gmail.com>2015-07-25 22:13:23 +0200
commite286cfbadf897212fe53aeba06fa74c8af644231 (patch)
tree510cceb85d722b71a24d6c4e1af54cce24b541d3 /src
parent129e3dedc32c5593d37a23f4eb1066fab7916d85 (diff)
citra-qt/command list: Enable uniform row heights and automatically resize columns.
Uniform row heights enables some optimisations for a smoother scrolling. Resize columns to content so that we don't have to do it manually
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index 425e127e..7ac3ea54 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -10,6 +10,7 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QTreeView>
+#include <QHeaderView>
#include <QSpinBox>
#include <QComboBox>
@@ -301,6 +302,13 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi
list_widget->setModel(model);
list_widget->setFont(QFont("monospace"));
list_widget->setRootIsDecorated(false);
+ list_widget->setUniformRowHeights(true);
+
+#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
+ list_widget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
+ list_widget->header()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
connect(list_widget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)),
this, SLOT(SetCommandInfo(const QModelIndex&)));