equal
deleted
inserted
replaced
129 - (NSSize)dialogExtraSize; |
129 - (NSSize)dialogExtraSize; |
130 - (void)setQtFont:(const QFont &)newFont; |
130 - (void)setQtFont:(const QFont &)newFont; |
131 - (QFont)qtFont; |
131 - (QFont)qtFont; |
132 - (void)finishOffWithCode:(NSInteger)result; |
132 - (void)finishOffWithCode:(NSInteger)result; |
133 - (void)cleanUpAfterMyself; |
133 - (void)cleanUpAfterMyself; |
|
134 - (void)setSubwindowStacking; |
134 @end |
135 @end |
135 |
136 |
136 static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) |
137 static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) |
137 { |
138 { |
138 QFont newFont; |
139 QFont newFont; |
185 |
186 |
186 [cancelButton setAction:@selector(onCancelClicked)]; |
187 [cancelButton setAction:@selector(onCancelClicked)]; |
187 [cancelButton setTarget:self]; |
188 [cancelButton setTarget:self]; |
188 } |
189 } |
189 |
190 |
|
191 mQtFont = new QFont(); |
|
192 return self; |
|
193 } |
|
194 |
|
195 - (void)setSubwindowStacking |
|
196 { |
190 #ifdef QT_MAC_USE_COCOA |
197 #ifdef QT_MAC_USE_COCOA |
191 // Stack the native dialog in front of its parent, if any: |
198 // Stack the native dialog in front of its parent, if any: |
192 QFontDialog *q = mPriv->fontDialog(); |
199 QFontDialog *q = mPriv->fontDialog(); |
193 if (!qt_mac_is_macsheet(q)) { |
200 if (!qt_mac_is_macsheet(q)) { |
194 if (QWidget *parent = q->parentWidget()) { |
201 if (QWidget *parent = q->parentWidget()) { |
197 addChildWindow:[mStolenContentView window] ordered:NSWindowAbove]; |
204 addChildWindow:[mStolenContentView window] ordered:NSWindowAbove]; |
198 } |
205 } |
199 } |
206 } |
200 } |
207 } |
201 #endif |
208 #endif |
202 |
|
203 mQtFont = new QFont(); |
|
204 return self; |
|
205 } |
209 } |
206 |
210 |
207 - (void)dealloc |
211 - (void)dealloc |
208 { |
212 { |
209 delete mQtFont; |
213 delete mQtFont; |
608 frameRect.size.width -= 1.0; |
612 frameRect.size.width -= 1.0; |
609 frameRect.size = [del windowWillResize:ourPanel toSize:frameRect.size]; |
613 frameRect.size = [del windowWillResize:ourPanel toSize:frameRect.size]; |
610 [ourPanel setFrame:frameRect display:NO]; |
614 [ourPanel setFrame:frameRect display:NO]; |
611 [ourPanel center]; |
615 [ourPanel center]; |
612 } |
616 } |
|
617 [del setSubwindowStacking]; |
613 NSString *title = @"Select font"; |
618 NSString *title = @"Select font"; |
614 [ourPanel setTitle:title]; |
619 [ourPanel setTitle:title]; |
615 } |
620 } |
616 |
621 |
617 void QFontDialogPrivate::mac_nativeDialogModalHelp() |
622 void QFontDialogPrivate::mac_nativeDialogModalHelp() |