Changeset 15385
- Timestamp:
- 12/06/05 18:15:48 (3 years ago)
- Location:
- haiku/trunk
- Files:
-
- 2 modified
-
headers/os/interface/Window.h (modified) (1 diff)
-
src/kits/interface/Window.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/headers/os/interface/Window.h
r15087 r15385 286 286 287 287 void _CreateTopView(); 288 void _AdoptResize(); 288 289 void _SetFocus(BView *focusView, bool notifyIputServer = false); 289 290 -
haiku/trunk/src/kits/interface/Window.cpp
r15374 r15385 738 738 fFrame.bottom = fFrame.top + height; 739 739 740 // Resize views according to their resize modes - this 741 // saves us some server communication, as the server 742 // does the same with our views on its side. 743 fTopView->_ResizeBy(width - fTopView->Bounds().Width(), 744 height - fTopView->Bounds().Height()); 745 740 _AdoptResize(); 746 741 FrameResized(width, height); 747 742 } … … 1063 1058 fLink->Read<float>(&fMinHeight); 1064 1059 fLink->Read<float>(&fMaxHeight); 1060 1061 _AdoptResize(); 1062 // TODO: the same has to be done for SetLook() (that can alter 1063 // the size limits, and hence, the size of the window 1065 1064 } 1066 1065 Unlock(); … … 1622 1621 if (fLink->FlushWithReply(status) == B_OK && status == B_OK) 1623 1622 fLook = look; 1623 1624 // TODO: this could have changed the window size, and thus, we 1625 // need to get it from the server (and call _AdoptResize()). 1624 1626 1625 1627 return status; … … 1850 1852 1851 1853 fFrame.SetRightBottom(fFrame.RightBottom() + BPoint(dx, dy)); 1854 _AdoptResize(); 1852 1855 } 1853 1856 Unlock(); … … 2369 2372 2370 2373 STRACE(("BuildTopView ended\n")); 2374 } 2375 2376 2377 /*! 2378 Resizes the top view to match the window size. This will also 2379 adapt the size of all its child views as needed. 2380 This method has to be called whenever the frame of the window 2381 changes. 2382 */ 2383 void 2384 BWindow::_AdoptResize() 2385 { 2386 // Resize views according to their resize modes - this 2387 // saves us some server communication, as the server 2388 // does the same with our views on its side. 2389 2390 int32 deltaWidth = fFrame.Width() - fTopView->Bounds().Width(); 2391 int32 deltaHeight = fFrame.Height() - fTopView->Bounds().Height(); 2392 if (deltaWidth == 0 && deltaHeight == 0) 2393 return; 2394 2395 fTopView->_ResizeBy(deltaWidth, deltaHeight); 2371 2396 } 2372 2397
