From 9ae8acd6ef6766fa6cffa8704e59617383563e80 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 11 Sep 2005 20:24:53 +0000 Subject: [PATCH] Ensure the button is updated on enter/leave events, as some styles may not do that. svn path=/trunk/KDE/kdegraphics/kpdf/; revision=459781 --- ui/minibar.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui/minibar.cpp b/ui/minibar.cpp index 8da2623a4..c7c51cd90 100644 --- a/ui/minibar.cpp +++ b/ui/minibar.cpp @@ -70,6 +70,8 @@ class HoverButton : public QPushButton protected: void paintEvent( QPaintEvent * e ); + void enterEvent( QPaintEvent * e ); + void leaveEvent( QPaintEvent * e ); }; @@ -405,6 +407,18 @@ HoverButton::HoverButton( QWidget * parent ) KAcceleratorManager::setNoAccel( this ); } +void HoverButton::enterEvent( QPaintEvent * e ) +{ + update(); + QPushButton::enterEvent( e ); +} + +void HoverButton::leaveEvent( QPaintEvent * e ) +{ + update(); + QPushButton::leaveEvent( e ); +} + void HoverButton::paintEvent( QPaintEvent * e ) { if ( hasMouse() )