Changeset 8 for trunk/src/styles
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- Location:
- trunk/src/styles
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/styles/qcommonstyle.cpp
r7 r8 146 146 #ifndef QT_NO_LISTVIEW 147 147 case PE_CheckListController: { 148 p->drawPixmap(r, QPixmap((const char **)check_list_controller_xpm)); 148 QRect pr( r ); 149 QPixmap px( (const char **)check_list_controller_xpm ); 150 // center pixmap if smaller, otherwise it will be scaled to fit 151 int d = pr.width() - px.width(); 152 if ( d > 0 ) { 153 pr.setX( pr.x() + d / 2 ); 154 pr.setWidth( px.width() ); 155 } 156 d = pr.height() - px.height(); 157 if ( d > 0 ) { 158 pr.setY( pr.y() + d / 2 ); 159 pr.setHeight( px.height() ); 160 } 161 p->drawPixmap( pr, px ); 149 162 break; } 150 163 case PE_CheckListExclusiveIndicator: { -
trunk/src/styles/qcompactstyle.cpp
r7 r8 152 152 const QPopupMenu *popupmenu = (const QPopupMenu *) widget; 153 153 QMenuItem *mi = opt.menuItem(); 154 155 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 156 // must erase areas not covered by menu items (this is requested by 157 // QPopupMenu using 0 as the menu item argument). 158 // [Win32 version feels ok without this, because it doesn't actually 159 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 160 // erases the background before WM_PAINT and after every resize]. 161 #if !defined (Q_WS_PM) 154 162 if ( !mi ) 155 163 break; 164 #endif 156 165 157 166 int tab = opt.tabWidth(); -
trunk/src/styles/qmotifplusstyle.cpp
r7 r8 757 757 QPopupMenu *popupmenu = (QPopupMenu *) widget; 758 758 QMenuItem *mi = opt.menuItem(); 759 760 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 761 // must erase areas not covered by menu items (this is requested by 762 // QPopupMenu using 0 as the menu item argument). 763 // [Win32 version feels ok without this, because it doesn't actually 764 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 765 // erases the background before WM_PAINT and after every resize]. 766 #if !defined (Q_WS_PM) 759 767 if ( !mi ) 760 768 break; 769 #endif 761 770 762 771 int tab = opt.tabWidth(); -
trunk/src/styles/qmotifstyle.cpp
r7 r8 1004 1004 const QPopupMenu *popupmenu = (const QPopupMenu *) widget; 1005 1005 QMenuItem *mi = opt.menuItem(); 1006 1007 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 1008 // must erase areas not covered by menu items (this is requested by 1009 // QPopupMenu using 0 as the menu item argument). 1010 // [Win32 version feels ok without this, because it doesn't actually 1011 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 1012 // erases the background before WM_PAINT and after every resize]. 1013 #if !defined (Q_WS_PM) 1006 1014 if ( !mi ) 1007 1015 break; 1016 #endif 1008 1017 1009 1018 int tab = opt.tabWidth(); -
trunk/src/styles/qsgistyle.cpp
r7 r8 946 946 break; 947 947 QMenuItem *mi = opt.menuItem(); 948 949 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 950 // must erase areas not covered by menu items (this is requested by 951 // QPopupMenu using 0 as the menu item argument). 952 // [Win32 version feels ok without this, because it doesn't actually 953 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 954 // erases the background before WM_PAINT and after every resize]. 955 #if !defined (Q_WS_PM) 948 956 if ( !mi ) 949 957 break; 958 #endif 950 959 const QPopupMenu *popupmenu = (const QPopupMenu *) widget; 951 960 int tab = opt.tabWidth(); -
trunk/src/styles/qwindowsstyle.cpp
r7 r8 85 85 enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight }; 86 86 87 #ifndef QT_NO_MENUDATA 87 88 // A friendly class providing access to QMenuData's protected member. 88 89 class FriendlyMenuData : public QMenuData … … 90 91 friend class QWindowsStyle; 91 92 }; 93 #endif 92 94 93 95 // Private class … … 158 160 break; 159 161 case QEvent::KeyRelease: 162 #ifndef QT_NO_MENUDATA 160 163 if (((QKeyEvent*)e)->key() == Key_Alt) { 161 164 widget = widget->topLevelWidget(); … … 172 175 } 173 176 } 177 #endif 174 178 break; 175 179 case QEvent::FocusIn: 176 180 case QEvent::FocusOut: 181 #ifndef QT_NO_MENUBAR 177 182 { 178 183 // Menubars toggle based on focus … … 181 186 menuBarTimer = menuBar->startTimer(0); 182 187 } 188 #endif 183 189 break; 184 190 case QEvent::Close: … … 188 194 break; 189 195 case QEvent::Timer: 196 #ifndef QT_NO_MENUBAR 190 197 { 191 198 QMenuBar *menuBar = ::qt_cast<QMenuBar*>(o); … … 198 205 } 199 206 } 207 #endif 200 208 break; 201 209 default: … … 841 849 const QPopupMenu *popupmenu = (const QPopupMenu *) widget; 842 850 QMenuItem *mi = opt.menuItem(); 851 852 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 853 // must erase areas not covered by menu items (this is requested by 854 // QPopupMenu using 0 as the menu item argument). 855 // [Win32 version feels ok without this, because it doesn't actually 856 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 857 // erases the background before WM_PAINT and after every resize]. 858 #if !defined (Q_WS_PM) 843 859 if ( !mi ) 844 860 break; 845 861 #endif 862 846 863 int tab = opt.tabWidth(); 847 864 int maxpmw = opt.maxIconWidth();
Note:
See TracChangeset
for help on using the changeset viewer.