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/qdatetimeedit.cpp

    r2 r174  
    10811081    QFontMetrics fm( font() );
    10821082    int fw = style().pixelMetric( QStyle::PM_DefaultFrameWidth, this );
    1083     int h = QMAX( fm.lineSpacing(), 14 ) + 2;
     1083    int h = QMAX( fm.lineSpacing(), 14 );
     1084    if ( style().styleHint( QStyle::SH_GUIStyle ) != QStyle::PMStyle )
     1085        h += 2;
    10841086    int w = 2 + fm.width( '9' ) * 8 + fm.width( d->ed->separator() ) * 2 + d->controls->upRect().width() + fw * 4;
    10851087
    1086     return QSize( w, QMAX(h + fw * 2,20) ).expandedTo( QApplication::globalStrut() );
     1088    return QSize( w, QMAX(h + fw * 2, 20) ).expandedTo( QApplication::globalStrut() );
    10871089}
    10881090
     
    25262528    QFontMetrics fm( font() );
    25272529    int fw = style().pixelMetric( QStyle::PM_DefaultFrameWidth, this );
    2528     int h = fm.lineSpacing() + 2;
     2530    int h = fm.lineSpacing();
     2531    if ( style().styleHint( QStyle::SH_GUIStyle ) != QStyle::PMStyle )
     2532        h += 2;
    25292533    int w = 2 + fm.width( '9' ) * 6 + fm.width( d->ed->separator() ) * 2 +
    25302534        d->controls->upRect().width() + fw * 4;
     
    25362540    }
    25372541
    2538     return QSize( w, QMAX(h + fw * 2,20) ).expandedTo( QApplication::globalStrut() );
     2542    return QSize( w, QMAX(h + fw * 2, 20) ).expandedTo( QApplication::globalStrut() );
    25392543}
    25402544
Note: See TracChangeset for help on using the changeset viewer.