Changeset 8 for trunk/src/widgets/qpopupmenu.cpp
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/widgets/qpopupmenu.cpp
r7 r8 1509 1509 itemh = sz.height(); 1510 1510 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); 1514 1514 if(!p->hasClipping() || p->clipRegion().contains(rect)) { 1515 1515 flags = QStyle::Style_Default; … … 1528 1528 ++row; 1529 1529 } 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); 1532 1532 if(!p->hasClipping() || p->clipRegion().contains(rect)) { 1533 1533 flags = QStyle::Style_Default; … … 1676 1676 actSig( mi->id(), b); 1677 1677 } 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 ); 1678 1687 #endif 1679 1688 } else if ( popup ) { … … 1919 1928 #endif 1920 1929 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 1922 1937 break; 1938 } 1923 1939 popup = mi->popup(); 1924 1940 if ( popup ) { … … 2009 2025 popup->setFirstItemActive(); 2010 2026 } else { 2027 #if !defined(Q_WS_PM) // do it later, only in case of item activation 2011 2028 byeMenuBar(); 2029 #endif 2012 2030 #ifndef QT_NO_WHATSTHIS 2013 2031 bool b = QWhatsThis::inWhatsThisMode(); … … 2016 2034 #endif 2017 2035 if ( mi->isEnabledAndVisible() || b ) { 2036 #if defined(Q_WS_PM) 2037 byeMenuBar(); 2038 #endif 2018 2039 active_popup_menu = this; 2019 2040 QGuardedPtr<QSignal> signal = mi->signal(); … … 2023 2044 active_popup_menu = 0; 2024 2045 } 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 2025 2053 } 2026 2054 } else if ( clashCount > 1 ) { // Clashes, highlight next...
Note:
See TracChangeset
for help on using the changeset viewer.