Ignore:
Timestamp:
Nov 6, 2007, 11:27:57 PM (18 years ago)
Author:
dmik
Message:

Styles: Implemented the first version of the Warp4 style (contributed by Cornelis Bockemuehl).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/widgets/qcombobox.cpp

    r2 r174  
    13391339    arrowRect.setHeight( QMAX(  height() - (2 * arrowRect.y()), arrowRect.height() ) );
    13401340
    1341     if ( count() && ( !editable() || arrowRect.contains( e->pos() ) ) ) {
     1341    bool dropDown;
     1342    int gs = style().styleHint(QStyle::SH_GUIStyle);
     1343    if ( gs == QStyle::PMStyle )
     1344        dropDown = count() && arrowRect.contains( e->pos() );
     1345    else
     1346        dropDown = count() && ( !editable() || arrowRect.contains( e->pos() ) );
     1347
     1348    if ( dropDown ) {
    13421349        d->arrowPressed = FALSE;
    13431350
     
    13581365        QTimer::singleShot( 200, this, SLOT(internalClickTimeout()));
    13591366        d->shortClick = TRUE;
     1367    }
     1368    else if ( gs == QStyle::PMStyle ) {
     1369        setFocus();
    13601370    }
    13611371}
Note: See TracChangeset for help on using the changeset viewer.