[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/runtime/kstyles/oxygen
From: Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date: 2010-03-24 18:44:23
Message-ID: 20100324184423.AA0C4AC86A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1107071 by hpereiradacosta:
Backport r1107068
Fixed hover and focus for Q3ListViews, like in e.g. konversation.
M +4 -2 animations/oxygenanimations.cpp
M +33 -2 oxygen.cpp
--- branches/KDE/4.4/kdebase/runtime/kstyles/oxygen/animations/oxygenanimations.cpp \
#1107070:1107071 @@ -138,11 +138,13 @@
} else if( widget->inherits( "QLineEdit" ) ) { return \
lineEditEngine().registerWidget( widget, \
AnimationHover|AnimationFocus ); }
else if( widget->inherits( "QTextEdit" ) ) { return \
lineEditEngine().registerWidget( widget, AnimationHover|AnimationFocus ); }
- // lists
- else if( widget->inherits( "QAbstractItemView" ) ) { return \
lineEditEngine().registerWidget( widget, \
AnimationHover|AnimationFocus ); }
else if( widget->inherits( "QProgressBar" ) ) { return \
progressBarEngine().registerWidget( widget ); }
else if( widget->inherits( "QDial" ) ) { return \
widgetStateEngine().registerWidget( widget, AnimationHover|AnimationFocus ); }
+ // lists
+ else if( widget->inherits( "QAbstractItemView" ) || widget->inherits( \
"Q3ListView" ) ) + { lineEditEngine().registerWidget( widget, \
AnimationHover|AnimationFocus ); } +
return false;
}
--- branches/KDE/4.4/kdebase/runtime/kstyles/oxygen/oxygen.cpp #1107070:1107071
@@ -3714,6 +3714,7 @@
|| qobject_cast<QTextEdit*>(widget)
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QDial*>(widget)
+ || widget->inherits( "Q3ListView" )
)
{ widget->setAttribute(Qt::WA_Hover); }
@@ -3805,6 +3806,10 @@
widget->installEventFilter(this);
+ } else if( widget->inherits( "Q3ListView" ) ) {
+
+ widget->installEventFilter(this);
+
}
// base class polishing
@@ -3844,8 +3849,12 @@
|| qobject_cast<QScrollBar*>(widget)
|| qobject_cast<QSlider*>(widget)
|| qobject_cast<QLineEdit*>(widget)
- ) { widget->setAttribute(Qt::WA_Hover, false); }
+ || widget->inherits( "Q3ListView ") )
+ { widget->setAttribute(Qt::WA_Hover, false); }
+ if( widget->inherits( "Q3ListView" ) )
+ { widget->removeEventFilter(this); }
+
if (qobject_cast<QMenuBar*>(widget)
|| (widget && widget->inherits("Q3ToolBar"))
|| qobject_cast<QToolBar*>(widget)
@@ -6254,8 +6263,30 @@
}
- // combobox container
+ // cast to QWidget
QWidget *widget = static_cast<QWidget*>(obj);
+
+ // Q3ListView
+ if( widget->inherits( "Q3ListView" ) )
+ {
+ switch(ev->type())
+ {
+ case QEvent::FocusIn:
+ {
+ widget->update();
+ return false;
+ }
+ case QEvent::FocusOut:
+ {
+ widget->update();
+ return false;
+ }
+
+ default: return false;
+ }
+
+ }
+
if (widget->inherits("QComboBoxPrivateContainer"))
{
switch(ev->type())
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic