Skip to content

Commit

Permalink
fixed Accordeon to work again after recent changes in Toplo/TripleEle…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
plantec committed Jan 28, 2025
1 parent 6af26c6 commit fc4da37
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/BaselineOfToplo/BaselineOfToplo.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ BaselineOfToplo >> registerPackages: spec [
package: #'Toplo-Widget-Button'
with: [
spec requires: #( #Toplo #'Toplo-Widget-Image' #'Toplo-Theme' ) ].

spec
package: #'Toplo-Widget-Button-Tests'
with: [ spec requires: #( #Toplo #'Toplo-Widget-Button' ) ].

spec
package: #'Toplo-Widget-Accordion'
with: [
spec requires: #( #Toplo #'Toplo-Widget-Button' #'Toplo-Theme' ) ].

spec
package: #'Toplo-Widget-Image'
with: [ spec requires: #( #Toplo #'Toplo-Theme' ) ].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ToAccordionListNodeManager >> buildNode: aNode [
aNode addChild: collapse at: 1
]

{ #category : #'instance creation' }
{ #category : #initialization }
ToAccordionListNodeManager >> constraintNode: aNode [

aNode constraintsDo: [ :c |
Expand All @@ -36,7 +36,7 @@ ToAccordionListNodeManager >> newNodeForHolder: aNodeHolder [
^ ToAccordionNode new
]

{ #category : #'instance creation' }
{ #category : #initialization }
ToAccordionListNodeManager >> unbuildNode: aNode [

aNode removeChildren.
Expand Down
10 changes: 9 additions & 1 deletion src/Toplo-Widget-Accordion/ToAccordionXPElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This version works but failed to honor the clicked skin event because (which is
Class {
#name : #ToAccordionXPElement,
#superclass : #ToElement,
#traits : 'TToButtonOwner + (TToTripletElement - {#tripletProperties:}) + TToLabeledIcon',
#classTraits : 'TToButtonOwner classTrait + TToTripletElement classTrait + TToLabeledIcon classTrait',
#instVars : [
'body',
'isCollapsed'
Expand Down Expand Up @@ -49,7 +51,7 @@ ToAccordionXPElement >> expand [
ToAccordionXPElement >> initialize [

super initialize.
self initializeButtonHolder.
self initializeAsButtonHolder.
isCollapsed := true.
self height: 30.
self layout: BlLinearLayout vertical.
Expand Down Expand Up @@ -105,3 +107,9 @@ ToAccordionXPElement >> properties [

^ self button properties
]

{ #category : #'t - triplet element - private - accessing' }
ToAccordionXPElement >> tripletProperties [

^ self button tripletProperties
]
4 changes: 3 additions & 1 deletion src/Toplo-Widget-Accordion/ToBasicAccordionElement.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Class {
#name : #ToBasicAccordionElement,
#superclass : #ToElement,
#traits : 'TToButtonOwner',
#classTraits : 'TToButtonOwner classTrait',
#instVars : [
'body',
'headerBuilder',
Expand Down Expand Up @@ -60,7 +62,7 @@ ToBasicAccordionElement >> expand [
ToBasicAccordionElement >> initialize [

super initialize.
self initializeButtonHolder.
self initializeAsButtonHolder.
isCollapsed := true.
self height: 30.
self layout: BlLinearLayout vertical.
Expand Down

0 comments on commit fc4da37

Please sign in to comment.