The Trunk: Morphic-mt.1562.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.1562.mcz

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

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

Name: Morphic-mt.1562
Author: mt
Time: 9 October 2019, 10:28:59.53532 am
UUID: ba72e6f2-86d5-8d43-b649-9e0a86c1602d
Ancestors: Morphic-eem.1561

Fixes a slip from yesterday, which now reduces text layout in pluggable text morphs from 3 passes to 2 passes.

=============== Diff against Morphic-eem.1561 ===============

Item was changed:
  ----- Method: ScrollPane>>hideOrShowScrollBars (in category 'layout - visibility') -----
  hideOrShowScrollBars
 
- self scroller hasSubmorphs ifTrue: [
- self flag: #performance. "mt: Can we know somehow in advance?"
- self scroller firstSubmorph changesHeightForWidth
- ifTrue: [self vHideScrollBar; resizeScroller; vHideOrShowScrollBar; resizeScroller].
- self scroller firstSubmorph changesWidthForHeight
- ifTrue: [self hHideScrollBar; resizeScroller; hHideOrShowScrollBar; resizeScroller]].
-
  self removeProperty: #doLayoutAgainHere. "Detect change."
 
  "There is the one edge case where no scroll bar would be needed if both scroll bars would just disappear."
  (((((self vScrollBarPolicy = #whenNeeded and: [self hScrollBarPolicy = #whenNeeded])
  and: [self retractableScrollBar not])
  and: [self vIsScrollbarShowing and: [self hIsScrollbarShowing]])
  and: [self hLeftoverScrollRange <= self vScrollBar width])
  and: [self vLeftoverScrollRange <= self hScrollBar height])
  ifTrue: [^ self vHideScrollBar; hHideScrollBar].
 
  self
  vHideOrShowScrollBar;
  hHideOrShowScrollBar.!

Item was changed:
  ----- Method: ScrollPane>>updateLayout (in category 'layout') -----
  updateLayout
  "Manually layout my submorphs. Maybe we can find a proper layout policy in the future."
 
+ self scroller hasSubmorphs ifTrue: [
+ self scroller firstSubmorph changesHeightForWidth
+ ifTrue: [self vHideScrollBar; resizeScroller; vHideOrShowScrollBar; resizeScroller]
+ ifFalse: [self scroller firstSubmorph changesWidthForHeight
+ ifTrue: [self hHideScrollBar; resizeScroller; hHideOrShowScrollBar; resizeScroller]
+ ifFalse: [self resizeScroller]]].
- "If the scroller happens to have a layout policy, we should compute its layout before updating the scroll bars"
- self resizeScroller.
 
  self
  resizeScrollBars;
  adjustOffset;
  setScrollDeltas.
-
-
  !