summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstyleoption.cpp
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2023-04-18 10:02:33 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2023-04-20 16:02:42 +0200
commitd4b40fa96bcb83eb8948c381bdae9c1ed0f223d0 (patch)
tree4fa339c0de03911085fc2aba97131074543866e3 /src/widgets/styles/qstyleoption.cpp
parent3d0fb2cea9c4e392497f9067d21b194124de9333 (diff)
QTabBar: draw text within moving tab
When a tab was moved by dragging, the tab's rectangle was drawn empty, without the tab text. When a tab was moved by animated snap back to its original position, the tab text was already drawn on the original position, while the rectangle was still moving due to animation. Adds the enum value QStyleOptionTab::TabPosition::Moving When this option is set, QCommonStyle draws the tab text at the current position instead of the original home position of the tab. The QMacStyle switches over the TabPosition enum. As a moving tab is laid out like the last tab in the given orientation, the enum value Moving is treated like End. Fixes: QTBUG-112277 Change-Id: I42a2d9c269dadfe9819c12dbc69e3ae995a45b09 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/styles/qstyleoption.cpp')
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index de7cd482a3..73164918bb 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1314,6 +1314,8 @@ QStyleOptionTab::QStyleOptionTab(int version)
\value Middle The tab is neither the first nor the last tab in the tab bar.
\value End The tab is the last tab in the tab bar.
\value OnlyOneTab The tab is both the first and the last tab in the tab bar.
+ \value Moving The tab is moving by mouse drag or animation.
+ This enum value was added in Qt 6.6.
\sa position
*/