- Timestamp:
- Sep 16, 2009, 11:12:02 PM (16 years ago)
- Location:
- trunk/src/gui/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r185 r186 126 126 QWidgetData *dataPtr() { return data; } 127 127 QWidgetPrivate *dptr() { return d_func(); } 128 //QRect frameStrut() const { return d_func()->frameStrut(); }128 QRect frameStrut() const { return d_func()->frameStrut(); } 129 129 bool pmEvent(QMSG *m, MRESULT *r) { return QWidget::pmEvent(m, r); } 130 130 // void markFrameStrutDirty() { data->fstrut_dirty = 1; } … … 917 917 #endif 918 918 919 MRESULT rc = (MRESULT) FALSE; 920 919 921 HWND hwndC = WinWindowFromID(hwnd, FID_CLIENT); 920 922 QETWidget *widget = (QETWidget*)QWidget::find(hwndC); … … 947 949 if (widget->translateConfigEvent(qmsg)) 948 950 return (MRESULT)TRUE; 951 break; 952 } 953 954 case WM_QUERYTRACKINFO: { 955 QWExtra *x = widget->xtra(); 956 if (x) { 957 rc = QtOldFrameProc(hwnd, msg, mp1, mp2); 958 PTRACKINFO pti = (PTRACKINFO) mp2; 959 int minw = 0, minh = 0; 960 int maxw = QWIDGETSIZE_MAX, maxh = QWIDGETSIZE_MAX; 961 QRect fs = widget->frameStrut(); 962 if (x->minw > 0) 963 minw = x->minw + fs.left() + fs.right(); 964 if (x->minh > 0) 965 minh = x->minh + fs.top() + fs.bottom(); 966 if (x->maxw < QWIDGETSIZE_MAX) 967 maxw = x->maxw >= x->minw ? x->maxw : x->minw + fs.left() + fs.right(); 968 if (x->maxh < QWIDGETSIZE_MAX) 969 maxh = x->maxh >= x->minh ? x->maxh : x->minh + fs.top() + fs.bottom(); 970 // obey system recommended minimum size (to emulate Qt/Win32) 971 pti->ptlMinTrackSize.x = qMax<LONG>(minw, pti->ptlMinTrackSize.x); 972 pti->ptlMinTrackSize.y = qMax<LONG>(minh, pti->ptlMinTrackSize.y); 973 // we assume that PM doesn't restrict the maximum size by default 974 // and use it as an absolute maximum (values above it will cause 975 // PM to disable window sizing and moving for some reason) 976 pti->ptlMaxTrackSize.x = qMin<LONG>(maxw, pti->ptlMaxTrackSize.x); 977 pti->ptlMaxTrackSize.y = qMin<LONG>(maxh, pti->ptlMaxTrackSize.y); 978 return rc; 979 } 949 980 break; 950 981 } -
trunk/src/gui/kernel/qwidget_pm.cpp
r184 r186 2196 2196 void QWidgetPrivate::setConstraints_sys() 2197 2197 { 2198 // @todo implement 2198 // @todo is there a way to show/hide the Maximize button according to 2199 // the shouldShowMaximizeButton() return value? 2199 2200 } 2200 2201
Note:
See TracChangeset
for help on using the changeset viewer.