diff options
author | Christian Ehrlicher <[email protected]> | 2025-04-25 23:15:41 +0200 |
---|---|---|
committer | Christian Ehrlicher <[email protected]> | 2025-07-01 20:25:19 +0200 |
commit | 21f3364c06f9ea03be7c29de90b4fbf9eb26425b (patch) | |
tree | 6b2eb93519c27c1fd1c0eebb16a9ab9cadf38886 | |
parent | fa225324cdb2867c9eb45b3c610651f9871c911a (diff) |
5d590a38d96206bcf5ad6ffe2b156223dc909fd7 made the drawing of the
itemview text dependent whether there is an editor or not. This is in
contrast to all other styles and also no longer needed because now the
editor properly paints it's background.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-136217
Task-number: QTBUG-119501
Change-Id: I84f64e71010d1a3d77949dee78426565252bed34
Reviewed-by: Wladimir Leuschner <[email protected]>
-rw-r--r-- | src/plugins/styles/modernwindows/qwindows11style.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index 7179109505b..3f40dea5eb9 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -1662,7 +1662,7 @@ void QWindows11Style::drawControl(ControlElement element, const QStyleOption *op } case CE_ItemViewItem: { if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView *>(widget)) { + if (qobject_cast<const QAbstractItemView *>(widget)) { QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget); QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, vopt, widget); QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, vopt, widget); @@ -1764,10 +1764,10 @@ void QWindows11Style::drawControl(ControlElement element, const QStyleOption *op QIcon::State state = vopt->state & QStyle::State_Open ? QIcon::On : QIcon::Off; vopt->icon.paint(painter, iconRect, vopt->decorationAlignment, mode, state); - if (!view || !view->isPersistentEditorOpen(vopt->index)) { - painter->setPen(highlightCurrent && highContrastTheme ? vopt->palette.base().color() : option->palette.text().color()); - d->viewItemDrawText(painter, vopt, textRect); - } + painter->setPen(highlightCurrent && highContrastTheme ? vopt->palette.base().color() + : vopt->palette.text().color()); + d->viewItemDrawText(painter, vopt, textRect); + // paint a vertical marker for QListView if (vopt->state & State_Selected) { if (const QListView *lv = qobject_cast<const QListView *>(widget); |