src/gui/kernel/qcocoawindowdelegate_mac.mm
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   392     if (qwidget && !qwidget->windowFilePath().isEmpty()) {
   392     if (qwidget && !qwidget->windowFilePath().isEmpty()) {
   393         return YES;
   393         return YES;
   394     }
   394     }
   395     return NO;
   395     return NO;
   396 }
   396 }
       
   397 
       
   398 - (void)syncContentViewFrame: (NSNotification *)notification
       
   399 {
       
   400     NSView *cView = [notification object];
       
   401     if (cView) {
       
   402         NSWindow *window = [cView window];
       
   403         QWidget *qwidget = m_windowHash->value(window);
       
   404         if (qwidget) {
       
   405             QWidgetData *widgetData = qt_qwidget_data(qwidget);
       
   406             NSRect rect = [cView frame];
       
   407             const QSize newSize(rect.size.width, rect.size.height);
       
   408             const QSize &oldSize = widgetData->crect.size();
       
   409             if (newSize != oldSize) {
       
   410                 [self syncSizeForWidget:qwidget toSize:newSize fromSize:oldSize];
       
   411             }
       
   412         }
       
   413 
       
   414     }
       
   415 }
       
   416 
   397 @end
   417 @end
   398 #endif// QT_MAC_USE_COCOA
   418 #endif// QT_MAC_USE_COCOA