From 0ac2c5b81fc3d619f5fb973d89dc8ef44cd3cf4f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 22 Jan 2011 17:49:46 +0000 Subject: [PATCH] if the theme wants to use the system style, disable completely any focusindicator svn path=/trunk/KDE/kdelibs/; revision=1216322 --- private/focusindicator.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/private/focusindicator.cpp b/private/focusindicator.cpp index 55a0bc0e0..7061fa5cb 100644 --- a/private/focusindicator.cpp +++ b/private/focusindicator.cpp @@ -121,7 +121,8 @@ void FocusIndicator::setCustomPrefix(const QString &prefix) bool FocusIndicator::eventFilter(QObject *watched, QEvent *event) { - if (static_cast(watched) != m_parent || !m_parent) { + if (Theme::defaultTheme()->useNativeWidgetStyle() || + static_cast(watched) != m_parent || !m_parent ) { return false; } @@ -274,6 +275,13 @@ void FocusIndicator::paint(QPainter *painter, const QStyleOptionGraphicsItem *op void FocusIndicator::syncGeometry() { + if (Theme::defaultTheme()->useNativeWidgetStyle()) { + hide(); + return; + } else if (!isVisible()) { + show(); + } + QRectF geom; if (!m_customGeometry.isEmpty()) { geom = m_customGeometry;