summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-25 12:01:36 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-26 12:50:49 +0200
commitca15f650a1a914bb9a41131109c46c4e52c5ebb1 (patch)
tree73327a50700125c541ed0661202973ac88027cb5 /doc
parent0198a74b72dfda9f40b2b786ce1d2ccb59780cbc (diff)
QTabBar: don't scroll when laying out the tabs
QTabBar lays out the tabs when the bar's size or content changes, often lazily. This should not change the scroll offset of the tabbar, which is controlled by the user, or at most when a tab needs to be made visible (e.g. when it becomes the current tab). Move the logic of updating the scoll offset into the makeVisible function, so that the scroll is only adjusted to either leave no gap between the last tab and the right edge of the widget of there is still a scroll; or to reset it to 0 if there is enough space for the entire tab bar. Since layoutTabs does show and hide the scroll buttons, we cannot skip this when the buttons are invisible. However, the normalizedScrollRect helper now needs to return the entire widget rect if there are no visible scroll buttons. Add a test case that simulates the previously broken behavior where the scroll got unnecessarily reset to 0 when resizing. Fixes: QTBUG-113140 Pick-to: 6.5 Change-Id: Ic19fbb82821ea09cc5e7646dcbce3aa7607909c2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions