Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

File:
1 edited

Legend:

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

    r7 r8  
    15091509        itemh = sz.height();
    15101510
    1511         if ( ncols > 1 && y + itemh > contentsRect().bottom() ) {
    1512             if ( y < contentsRect().bottom() ) {
    1513                 QRect rect(x, y, itemw, contentsRect().bottom() - y);
     1511        if ( ncols > 1 && y + itemh - 1 > contentsRect().bottom() ) {
     1512            if ( y <= contentsRect().bottom() ) {
     1513                QRect rect(x, y, itemw, contentsRect().bottom() - y + 1);
    15141514                if(!p->hasClipping() || p->clipRegion().contains(rect)) {
    15151515                    flags = QStyle::Style_Default;
     
    15281528        ++row;
    15291529    }
    1530     if ( y < contentsRect().bottom() ) {
    1531         QRect rect(x, y, itemw, contentsRect().bottom() - y);
     1530    if ( y <= contentsRect().bottom() ) {
     1531        QRect rect(x, y, itemw, contentsRect().bottom() - y + 1);
    15321532        if(!p->hasClipping() || p->clipRegion().contains(rect)) {
    15331533            flags = QStyle::Style_Default;
     
    16761676                actSig( mi->id(), b);
    16771677            }
     1678#endif
     1679#if defined(Q_WS_PM)
     1680#ifndef QT_NO_WHATSTHIS
     1681            else
     1682#endif
     1683//@@TODO (dmik): we need to play a sound when a disabled item is activated
     1684//  to conform to the OS/2 CUA. Btw, should'n it be supported by QAccessibility
     1685//  globally in Qt?
     1686                WinAlarm( HWND_DESKTOP, WA_ERROR );
    16781687#endif
    16791688        } else  if ( popup ) {
     
    19191928#endif
    19201929            mi = mitems->at( actItem );
    1921             if ( !mi->isEnabled() && !b )
     1930            if ( !mi->isEnabled() && !b ) {
     1931#if defined(Q_WS_PM)
     1932//@@TODO (dmik): we need to play a sound when a disabled item is activated
     1933//  to conform to the OS/2 CUA. Btw, should'n it be supported by QAccessibility
     1934//  globally in Qt?
     1935                WinAlarm( HWND_DESKTOP, WA_ERROR );
     1936#endif
    19221937                break;
     1938            }
    19231939            popup = mi->popup();
    19241940            if ( popup ) {
     
    20092025                popup->setFirstItemActive();
    20102026            } else {
     2027#if !defined(Q_WS_PM) // do it later, only in case of item activation
    20112028                byeMenuBar();
     2029#endif
    20122030#ifndef QT_NO_WHATSTHIS
    20132031                bool b = QWhatsThis::inWhatsThisMode();
     
    20162034#endif
    20172035                if ( mi->isEnabledAndVisible() || b ) {
     2036#if defined(Q_WS_PM)
     2037                    byeMenuBar();
     2038#endif
    20182039                    active_popup_menu = this;
    20192040                    QGuardedPtr<QSignal> signal = mi->signal();
     
    20232044                    active_popup_menu = 0;
    20242045                }
     2046#if defined(Q_WS_PM)
     2047//@@TODO (dmik): we need to play a sound when the disabled item is activated
     2048//  to conform to the OS/2 CUA. Btw, should'n it be supported by QAccessibility
     2049//  globally in Qt?
     2050                else
     2051                    WinAlarm( HWND_DESKTOP, WA_ERROR );
     2052#endif
    20252053            }
    20262054        } else if ( clashCount > 1 ) { // Clashes, highlight next...
Note: See TracChangeset for help on using the changeset viewer.