From 2ed8f9ade70bd38a541d7e62e02962a1311aabb5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 16 Oct 2012 16:02:16 -0500 Subject: Use internal Qt hover widget drawing --- kstyles/asteroid/asteroid.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'kstyles/asteroid') diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index ca93f0b37..7f06b2ee8 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -2615,16 +2615,12 @@ void AsteroidStyle::paletteChanged() bool AsteroidStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) { - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { - TQObject* o = reinterpret_cast(source); - /* Win2K has this interesting behaviour where it sets the current - default button to whatever pushbutton the user presses the mouse - on. I _think_ this emulates that properly. -clee */ - if (o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { - if (e->type() == TQEvent::MouseButtonPress) { - TQPushButton *pb = dynamic_cast(o); - pb->setDefault(TRUE); - } + /* Win2K has this interesting behaviour where it sets the current + default button to whatever pushbutton the user presses the mouse + on. I _think_ this emulates that properly. -clee */ + if (ceData.widgetObjectTypes.contains(TQPUSHBUTTON_OBJECT_NAME_STRING)) { + if (e->type() == TQEvent::MouseButtonPress) { + widgetActionRequest(ceData, elementFlags, source, WAR_SetDefault); } } -- cgit v1.2.1