203 NSRect rect = [[mStolenContentView superview] frame];
213 [mOkButton sizeToFit];
214 NSSize okSizeHint = [mOkButton frame].size;
216 [mCancelButton sizeToFit];
217 NSSize cancelSizeHint = [mCancelButton frame].size;
220 qMax(okSizeHint.width, cancelSizeHint.width)),
221 CGFloat((rect.size.width - 2.0 * ButtonSideMargin - ButtonSpacing) * 0.5));
223 qMax(okSizeHint.height, cancelSizeHint.height));
225 NSRect okRect = { { rect.size.width - ButtonSideMargin - ButtonWidth,
226 ButtonBottomMargin },
227 { ButtonWidth, ButtonHeight } };
228 [mOkButton setFrame:okRect];
229 [mOkButton setNeedsDisplay:YES];
231 NSRect cancelRect = { { okRect.origin.x - ButtonSpacing - ButtonWidth,
232 ButtonBottomMargin },
233 { ButtonWidth, ButtonHeight } };
234 [mCancelButton setFrame:cancelRect];
235 [mCancelButton setNeedsDisplay:YES];
237 const CGFloat Y = ButtonBottomMargin + ButtonHeight + ButtonTopMargin;
238 NSRect stolenCVRect = { { 0.0, Y },
239 { rect.size.width, rect.size.height - Y } };
240 [mStolenContentView setFrame:stolenCVRect];
241 [mStolenContentView setNeedsDisplay:YES];
243 [[mStolenContentView superview] setNeedsDisplay:YES];
244 mMinWidth = 2 * ButtonSideMargin + ButtonSpacing + 2 * ButtonWidth;
const CGFloat ButtonSideMargin
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
const CGFloat ButtonBottomMargin
const CGFloat ButtonSpacing
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
const CGFloat ButtonTopMargin
const CGFloat ButtonMinWidth
const CGFloat ButtonMinHeight