Dialog.cpp   Dialog.cpp 
skipping to change at line 65 skipping to change at line 65
else if (targetPos.y() > lowerBoundY) else if (targetPos.y() > lowerBoundY)
targetPos.setY(lowerBoundY); targetPos.setY(lowerBoundY);
p->move(targetPos); p->move(targetPos);
} }
void ResizeFrame::mouseMoveEvent(QMouseEvent *event) void ResizeFrame::mouseMoveEvent(QMouseEvent *event)
{ {
QPoint dpos = event->pos() - mousePos; QPoint dpos = event->pos() - mousePos;
QWidget* p = dynamic_cast<QWidget*>(QFrame::parent()->parent()); QWidget* p = dynamic_cast<QWidget*>(QFrame::parent()->parent());
int w = p->size().width(); if (p!=NULL)
int h = p->size().height();
int minw;
int minh;
if (p->minimumSizeHint().isValid())
{
minw = p->minimumSizeHint().width();
minh = p->minimumSizeHint().height();
}
else
{ {
minw = p->minimumWidth() > 0 ? p->minimumWidth() : 24; int w = p->size().width();
minh = p->minimumHeight() > 0 ? p->minimumHeight() : 24; int h = p->size().height();
} int minw;
int minh;
if (p->minimumSizeHint().isValid())
{
minw = p->minimumSizeHint().width();
minh = p->minimumSizeHint().height();
}
else
{
minw = p->minimumWidth() > 0 ? p->minimumWidth() : 2
4;
minh = p->minimumHeight() > 0 ? p->minimumHeight() :
24;
}
// The minimum size will only be enforced if the widget is being // The minimum size will only be enforced if the widget is b
// shrunk, and its size is larger than its minimum size. (If, for so eing
me // shrunk, and its size is larger than its minimum size. (If
// reason, the widget's size is already *smaller* than its minimum , for some
// size, and the user is actually trying to *shrink* it, then it wou // reason, the widget's size is already *smaller* than its m
ld inimum
// be rather odd to *enlarge* the widget to its minimum size.) // size, and the user is actually trying to *shrink* it, the
if (w + dpos.x() >= minw) n it would
w += dpos.x(); // be rather odd to *enlarge* the widget to its minimum size
else if (w > minw && dpos.x() < 0) .)
w = minw; if (w + dpos.x() >= minw)
if (h + dpos.y() >= minh) w += dpos.x();
h += dpos.y(); else if (w > minw && dpos.x() < 0)
else if (h > minh && dpos.y() < 0) w = minw;
h = minh; if (h + dpos.y() >= minh)
h += dpos.y();
else if (h > minh && dpos.y() < 0)
h = minh;
p->setUpdatesEnabled(false); p->setUpdatesEnabled(false);
p->resize(w, h); p->resize(w, h);
p->setUpdatesEnabled(true); p->setUpdatesEnabled(true);
}
} }
 End of changes. 4 change blocks. 
32 lines changed or deleted 40 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/