Fix 1px vertical scroll by wheel on the debugger toolbar

The toolbar is wrapped around QScrollArea.
Because the height of toolbar (=25px) is 1px bigger than the height of
the scroll area (=24px), widgets on the toolbar move up/down 1px by
mouse wheel.

Fixes: QTCREATORBUG-28107
Change-Id: I83dc9c6d7b0916f31d5f0f15f310be3b0d149bec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Tasuku Suzuki
2022-08-26 22:47:21 +09:00
parent e197acd97b
commit 093739485e

View File

@@ -233,7 +233,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
scrolledToolbar->setFrameStyle(QFrame::NoFrame);
scrolledToolbar->setWidgetResizable(true);
scrolledToolbar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrolledToolbar->setFixedHeight(StyleHelper::navigationWidgetHeight());
scrolledToolbar->setFixedHeight(toolbar->height());
scrolledToolbar->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
auto dock = new QDockWidget(Tr::tr("Toolbar"), q);