From b7e01ff7d994d704cbcd876a77bf32cbdf66c17b Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 20 May 2009 12:45:11 +0200 Subject: Revert focus apparance on itemviews for X11 We changed this primarily for the mac as active appearance on widgets in itemviews should depend on the window activation state and not on the focus widget. It was explicitly added back for windows only but has been reported as a bug on X11 as well so we might as well keep it mac-only for now. Reviewed-by: mortens --- src/gui/itemviews/qabstractitemview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 7a3d674..c77395a 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -3220,9 +3220,9 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const option.state &= ~QStyle::State_MouseOver; option.font = font(); -#ifdef Q_WS_WIN - // Note this is currently required on Windows - // do give non-focused item views inactive appearance +#ifndef Q_WS_MAC + // On mac the focus appearance follows window activation + // not widget activation if (!hasFocus()) option.state &= ~QStyle::State_Active; #endif -- cgit v0.12