# HG changeset patch # User Gerald Klix (speedy) # Date 1679401653 -3600 # Tue Mar 21 13:27:33 2023 +0100 # Node ID fdecdd8b2ff5abd8ea0a736dada3ac7b1f875b21 # Parent c56784b0d4901715bf866b769ed5707f61e1403f SUM: Adapted to Cuis' latest canvas changes. diff --git a/haver/ui/DNDIndentingListItemMorph.pck.st b/haver/ui/DNDIndentingListItemMorph.pck.st --- a/haver/ui/DNDIndentingListItemMorph.pck.st +++ b/haver/ui/DNDIndentingListItemMorph.pck.st @@ -1,15 +1,16 @@ -'From Haver 6.0 [latest update: #5492] on 23 September 2022 at 8:37:11 pm'! +'From Haver 6.0 [latest update: #5708] on 21 March 2023 at 1:25:14 pm'! 'Description Drag and Drop for the Indenting list item morph.'! -!provides: 'DNDIndentingListItemMorph' 1 5! +!provides: 'DNDIndentingListItemMorph' 1 6! SystemOrganization addCategory: 'DNDIndentingListItemMorph'! !moduleCreation: DNDIndentingListItemMorph! Modules newEnvironment: #DNDIndentingListItemMorph! + !interfacesOf: DNDIndentingListItemMorph! Modules environment: #DNDIndentingListItemMorph :: - interface: #SPI exporting: #(#DNDDraggingGuideMorph #DNDInnerHierarchicalListMorph #DNDIndentingListItemMorph #DNDHierarchicalListMorph ) :: + interface: #SPI exporting: #(#DNDInnerHierarchicalListMorph #DNDIndentingListItemMorph #DNDDraggingGuideMorph #DNDHierarchicalListMorph ) :: interface: #API exporting: #(#(#HierarchicalListMorph #DNDHierarchicalListMorph ) ) :: interface: #UTI aliasFor: #API! @@ -219,7 +220,7 @@ font: self fontToUse color: colorToUse! ! -!(Modules>>#DNDIndentingListItemMorph>>#DNDIndentingListItemMorph) methodsFor: 'drawing' stamp: 'KLG 9/23/2022 20:18:12'! +!(Modules>>#DNDIndentingListItemMorph>>#DNDIndentingListItemMorph) methodsFor: 'drawing' stamp: 'KLG 3/21/2023 13:03:26'! drawOn: aCanvas | x centeringOffset | @@ -235,25 +236,25 @@ color: (Theme current listHighlightFocused: owner owner hasKeyboardFocus) ]. - x _ 12 * indentLevel. + x := 12 * indentLevel. complexContents hasContents ifTrue: [ isExpanded - ifTrue: [ aCanvas drawExpandedAt: x@(extent y//2)] - ifFalse: [ aCanvas drawNotExpandedAt: x@(extent y//2) ]]. - x _ x + 18. + ifTrue: [ aCanvas drawExpandedAt: x@(extent y//2) height: self indentWidth ] + ifFalse: [ aCanvas drawNotExpandedAt: x@(extent y//2) height: self indentWidth ]]. + x := x + 18. submorphs ifNotNil: [ submorphs ifNotEmpty: [ - x _ x max: (submorphs max: [ :subMorph | + x := x max: (submorphs max: [ :subMorph | subMorph morphPosition x + subMorph morphWidth ]) ] ] . icon ifNotNil: [ - centeringOffset _ ((extent y - icon height) / 2.0) roundedHAFZ. + centeringOffset := ((extent y - icon height) / 2.0) roundedHAFZ. aCanvas image: icon at: (x @ centeringOffset). - x _ x + 20 ]. + x := x + 20 ]. aCanvas drawString: contents asString