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

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

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

Name: Morphic-mt.867
Author: mt
Time: 13 April 2015, 5:16:16.01 pm
UUID: 52e544de-d33f-0346-9646-bfe830d53ac5
Ancestors: Morphic-mt.866

Fixed a bug with scrolling that occured at the transition from needing to not needing scrollbars (or vice versa). We must ensure that scroll bars reflect the current of the scroller---regardless of their visibility.

=============== Diff against Morphic-mt.866 ===============

Item was changed:
  ----- Method: ScrollPane>>extent: (in category 'geometry') -----
  extent: newExtent
 
  | oldW oldH wasHShowing wasVShowing noVPlease noHPlease minH minW |
 
  oldW := self width.
  oldH := self height.
  wasHShowing := self hIsScrollbarShowing.
  wasVShowing := self vIsScrollbarShowing.
 
  "Figure out the minimum width and height for this pane so that scrollbars will appear"
  noVPlease := self valueOfProperty: #noVScrollBarPlease ifAbsent: [false].
  noHPlease := self valueOfProperty: #noHScrollBarPlease ifAbsent: [false].
  minH := self scrollBarThickness + 16.
  minW := self scrollBarThickness + 20.
  noVPlease ifTrue:[
  noHPlease
  ifTrue:[minH := 1. minW := 1 ]
  ifFalse:[minH := self scrollBarThickness ].
  ] ifFalse:[
  noHPlease
  ifTrue:[minH := self scrollBarThickness + 5].
  ].
  super extent: (newExtent max: (minW@minH)).
 
  "Now reset widget sizes"
  self resizeScrollBars; resizeScroller; hideOrShowScrollBars.
 
  "Now resetScrollDeltas where appropriate, first the vScrollBar..."
+ self height ~~ oldH ifTrue: [self vSetScrollDelta].
- ((self height ~~ oldH) or: [ wasHShowing ~~ self hIsScrollbarShowing]) ifTrue:
- [(retractableScrollBar or: [ self vIsScrollbarShowing ]) ifTrue:
- [ self vSetScrollDelta ]].
 
  "...then the hScrollBar"
+ self width ~~ oldW ifTrue: [self hSetScrollDelta].
- ((self width ~~ oldW) or: [wasVShowing ~~ self vIsScrollbarShowing]) ifTrue:
- [(retractableScrollBar or: [ self hIsScrollbarShowing ]) ifTrue:
- [ self hSetScrollDelta ]].
 
  !