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

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

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

Name: Morphic-mt.1574
Author: mt
Time: 15 October 2019, 10:35:01.68525 am
UUID: 71d26af5-1618-f040-a68e-8ce47b2a5736
Ancestors: Morphic-mt.1573

Fixes a bug with list-selection restoring after changing UI themes, for example. Tweaks appearance of list filters for demo/hi-dpi mode. Removes the use of #bigDisplay property. RealEstateManage handles window resizing just fine.

=============== Diff against Morphic-mt.1573 ===============

Item was changed:
  ----- Method: LazyListMorph>>displayFilterOn:for:in:font: (in category 'drawing') -----
  displayFilterOn: canvas for: row in: drawBounds font: font
  "Draw filter matches if any."
 
+ | fillStyle fillHeight |
- | fill height |
  listSource filterableList ifFalse: [^ self].
 
+ fillHeight := font height.
+ fillStyle := self filterColor isColor
- height := font height.
- fill := self filterColor isColor
  ifTrue: [SolidFillStyle color: self filterColor]
  ifFalse: [self filterColor].
+ fillStyle isGradientFill ifTrue: [
+ fillStyle origin: drawBounds topLeft.
+ fillStyle direction: 0@ fillHeight].
- fill isGradientFill ifTrue: [
- fill origin: drawBounds topLeft.
- fill direction: 0@ font height].
 
+ (self filterOffsets: row) do: [:offset |
+ | highlightRectangle |
+ highlightRectangle := ((drawBounds left + offset first first) @ drawBounds top
+ corner: (drawBounds left + offset first last) @ (drawBounds top + fillHeight)).
- (self filterOffsets: row) do: [:offset | | r |
- r := ((drawBounds left + offset first first) @ drawBounds top corner: (drawBounds left + offset first last) @ (drawBounds top + height)).
  canvas
+ frameAndFillRoundRect: (highlightRectangle outsetBy: 1@0)
+ radius: (3 * RealEstateAgent scaleFactor) truncated
+ fillStyle: fillStyle
+ borderWidth: (1 * RealEstateAgent scaleFactor) truncated
+ borderColor: fillStyle asColor twiceDarker.
- frameAndFillRoundRect: (r outsetBy: 1@0)
- radius: 3
- fillStyle: fill
- borderWidth: 1
- borderColor: fill asColor twiceDarker.
  canvas
  drawString: offset second
+ in: highlightRectangle
- in: r
  font: font
  color: self filterTextColor].!

Item was changed:
  ----- Method: PluggableListMorph>>verifyContents (in category 'updating') -----
  verifyContents
  "Verify the contents of the receiver, reconstituting if necessary.  Called whenever window is reactivated, to react to possible structural changes.  Also called periodically in morphic if the smartUpdating preference is true"
 
  | currentList modelList modelIndex |
  self flag: #performance. "mt: We do have changed/update. Why can't the tools communicate through an appropriate notifier such as the SystemChangeNotifier?"
 
  "1) Is the list still up to date?"
  currentList := fullList. fullList := nil.
  modelList := self getFullList.
+ modelList = currentList
+ ifFalse: [self updateList: modelList].
- modelList = currentList ifTrue: [^ self].
- self updateList: modelList.
 
  "2) Is the selection still up to date?"
  modelIndex := self getCurrentSelectionIndex.
+ (self modelIndexFor: self selectionIndex) = modelIndex
+ ifFalse: [self updateListSelection: modelIndex].!
- (self modelIndexFor: self selectionIndex) = modelIndex ifTrue: [^ self].
- self updateListSelection: modelIndex.!

Item was changed:
  ----- Method: SystemWindow>>applyModelExtent (in category 'initialization') -----
  applyModelExtent
+ self extent: model initialExtent !
- | initialExtent |
- initialExtent := Preferences bigDisplay
- ifTrue: [(model initialExtent * 1.5) rounded]
- ifFalse: [model initialExtent].
- self extent: initialExtent !