The Trunk: Morphic-mt.2229.mcz

[email protected] Mon, 3 Aug 2026 08:33:59 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2229.mcz

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

Name: Morphic-mt.2229
Author: mt
Time: 3 August 2026, 10:33:57.770342 am
UUID: fef11041-7734-3040-a6cc-25f90416e7f6
Ancestors: Morphic-mt.2228

Fixes slip in visuals that indicate filters in tree widget, noticeable when disabling the flat-widget look.

On creation, a widgets filter colors are propagated to each item, which should then be used in the drawing code. See senders (and implementors) of #filterColor: and #filterTextColor:.

=============== Diff against Morphic-mt.2228 ===============

Item was changed:
  ----- Method: IndentingListItemMorph>>drawFilterOn:in: (in category 'drawing') -----
  drawFilterOn: aCanvas in: drawBounds
  	"Draw filter matches if any. Based on LazyListMorph >> #displayFilterOn:for:in:font:."
  	
  	| fillStyle fillHeight leading columnOffsets o cw |
  	filterOffsets ifEmpty: [^ self].
  	
  	fillHeight := font lineGridForMorphs.
+ 	fillStyle := self filterColor isColor
+ 		ifTrue: [SolidFillStyle color: self filterColor]
+ 		ifFalse: [self filterColor].
- 	fillStyle := container filterColor isColor
- 		ifTrue: [SolidFillStyle color: container filterColor]
- 		ifFalse: [container filterColor].
  	fillStyle isGradientFill ifTrue: [
  		fillStyle origin: drawBounds topLeft.
  		fillStyle direction: 0@ fillHeight].
  	
  	leading := font lineGapSliceForMorphs.
  	
  	columnOffsets := (container columns isNil or: [container columns size = 1])
  		ifTrue: [
  			o := drawBounds left.
  			icon ifNotNil: [o := o + icon width + 2 px].
  			{ o }]
  		ifFalse: [
  			 (0 to: container columns size - 1) collect: [ :column |
  				column = 0
  					ifTrue: [o := drawBounds left]
  					ifFalse: [
  						cw := self widthOfColumn: column.
  						column = 1
  							ifTrue: [ "Reduce width by indentation present in first column only"
  								cw := cw - (drawBounds left - self left) + self hMargin].
  						column + 1 = self class iconColumnIndex ifTrue: [
  							icon ifNotNil: [o := o + icon width + 2 px]].
  						o := o + cw + 5 px]] ].
  	
  	filterOffsets do: [:offset |
  		| highlightRectangle |
  		highlightRectangle := (((columnOffsets at: offset third) + offset first first) @ drawBounds top
  			corner: ((columnOffsets at: offset third) + offset first last) @ (drawBounds top + fillHeight)).
  		aCanvas
  			frameAndFillRoundRect: (highlightRectangle outsetBy: 1 px @ 0)
  			radius: 3 px
  			fillStyle: fillStyle
  			borderWidth: 1 px
  			borderColor: fillStyle asColor twiceDarker.
  		aCanvas
  			drawString: offset second
  			in: (highlightRectangle origin + (0 @ leading) corner: highlightRectangle corner)
  			font: font
+ 			color: self filterTextColor].!
- 			color: container filterTextColor].!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]