forked from qt-creator/qt-creator
QtSupport: Set a lower single step in ExamplesPageWidget view
By default, the view scrolls by a whole row when using arrow keys or mouse wheel. With rows with a height as in the examples view, this causes more of a fast flickering than the impression of a scrolling. The single step value of 25 which is set by this change makes it look smoother. Change-Id: I7fe9fe49dab71cebdfd8b01eef245813783426ae Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QPainter>
|
||||
#include <QPushButton>
|
||||
#include <QScrollBar>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QTimer>
|
||||
|
||||
@@ -316,6 +317,8 @@ public:
|
||||
auto gridView = new GridView(this);
|
||||
gridView->setModel(&m_gridModel);
|
||||
gridView->setItemDelegate(&m_exampleDelegate);
|
||||
if (auto sb = gridView->verticalScrollBar())
|
||||
sb->setSingleStep(25);
|
||||
vbox->addWidget(gridView);
|
||||
|
||||
connect(&m_exampleDelegate, &ExampleDelegate::tagClicked,
|
||||
|
Reference in New Issue
Block a user