Guest User

Untitled

a guest
Jun 29th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. nsWindow::OnResizeEvent(QGraphicsSceneResizeEvent *aEvent)
  2. {
  3.     nsIntRect rect;
  4.  
  5.     // Generate XPFE resize event
  6.     GetBounds(rect);
  7.  
  8.     rect.width = aEvent->newSize().width();
  9.     rect.height = aEvent->newSize().height();
  10.  
  11.     mBounds.width = rect.width;
  12.     mBounds.height = rect.height;
  13.  
  14.     printf("OnResizeEvent: mBounds.width=%d, mBounds.height=%d\n", mBounds.width
  15. , mBounds.height);
  16.  
  17.     nsEventStatus status;
  18.     DispatchResizeEvent(rect, status);
  19.  
  20.     if (mIsTopLevel) {    
  21.         qDebug() <<"OnResizeEvent: mIsTopLevel is TRUE";
  22.         rect.adjuct(0,0,-1,-1);
  23.         qDebug() <<"OnResizeEvent: Resize()";
  24.         Resize(rect.width, rect.height, true);
  25.     }
  26.     return status;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment