[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: qt-copy/src/widgets
From: Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date: 2003-03-04 15:35:40
[Download RAW message or body]
CVS commit by pfeiffer:
re-applied click handling fix
M +12 -0 qcheckbox.cpp 1.50
M +1 -1 qcheckbox.h 1.49
M +9 -1 qradiobutton.cpp 1.50
--- qt-copy/src/widgets/qcheckbox.cpp #1.49:1.50
@@ -346,3 +346,15 @@ void QCheckBox::updateMask()
setMask(bm);
}
+
+bool QCheckBox::hitButton( const QPoint &pos ) const
+{
+ QRect r = QStyle::visualRect( style().subRect( QStyle::SR_CheckBoxFocusRect, this ), this );
+ if ( qApp->reverseLayout() ) {
+ r.setRight( width() );
+ } else {
+ r.setLeft( 0 );
+ }
+ return r.contains( pos );
+}
+
#endif
--- qt-copy/src/widgets/qcheckbox.h #1.48:1.49
@@ -73,5 +73,5 @@ protected:
void drawButtonLabel( QPainter * );
void updateMask();
-
+ virtual bool hitButton( const QPoint &pos ) const;
private: // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
--- qt-copy/src/widgets/qradiobutton.cpp #1.49:1.50
@@ -175,5 +175,13 @@ QSize QRadioButton::sizeHint() const
bool QRadioButton::hitButton( const QPoint &pos ) const
{
- return rect().contains( pos );
+ QRect r =
+ QStyle::visualRect( style().subRect( QStyle::SR_RadioButtonFocusRect,
+ this ), this );
+ if ( qApp->reverseLayout() ) {
+ r.setRight( width() );
+ } else {
+ r.setLeft( 0 );
+ }
+ return r.contains( pos );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic