The Trunk: Morphic-mt.1518.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1518.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1518.mcz

==================== Summary ====================

Name: Morphic-mt.1518
Author: mt
Time: 12 September 2019, 11:38:11.625062 am
UUID: 6243d85f-1155-834e-8844-61f6b245ff65
Ancestors: Morphic-mt.1517

Fixes a bug in scroll panes that use a layout policy in their scrollers (i.e., transform morphs).

=============== Diff against Morphic-mt.1517 ===============

Item was changed:
  ----- Method: ScrollPane>>doLayoutIn: (in category 'layout') -----
  doLayoutIn: layoutBounds
  "Manually layout my submorphs. Maybe we can find a proper layout policy in the future."
 
  self removeProperty: #doLayoutAgain.
  self
  resizeScrollBars;
  resizeScroller;
  adjustOffset;
  setScrollDeltas.
 
+ "If the scroller happens to have a layout policy, we should compute its layout before any additional run."
+ self scroller fullBounds.
+
  "Do one additional run if required."
  (self hasProperty: #doLayoutAgain) ifTrue: [
  self doLayoutIn: layoutBounds.
  self assert: (self hasProperty: #doLayoutAgain) not.
  ^ self].
 
  super doLayoutIn: layoutBounds.!

Item was changed:
  ----- Method: ScrollPane>>extentToFit (in category 'geometry') -----
  extentToFit
  "Resize scroll pane to exactly fit its contents."
 
  | offset |
  offset := 0@0.
  (retractableScrollBar not and: [self vScrollBarPolicy == #always])
  ifTrue: [offset := (self scrollBarThickness - self borderWidth) @ offset y].
  (retractableScrollBar not and: [self hScrollBarPolicy == #always])
  ifTrue: [offset := offset x @ (self scrollBarThickness - self borderWidth)].
 
+ ^ scroller submorphBoundsForShrinkWrap extent + offset + (2* (self borderWidth @ self borderWidth))!
- ^ scroller submorphBounds extent + offset + (2* (self borderWidth @ self borderWidth))!