Socialmetrica/Datanalitica.package/TwitterUser.class/instance/asCardElement.st

29 lines
1.1 KiB
Smalltalk
Raw Normal View History

2021-08-22 02:14:22 +00:00
ui
asCardElement
^ BrHorizontalPane new
hFitContent;
vFitContent;
padding: (BlInsets all: 20);
margin: (BlInsets all: 10);
addChild: (self profileImage asElement asScalableElement size: 124@124);
addChild: (BrVerticalPane new
fitContent;
margin: (BlInsets left: 20);
2021-08-22 02:14:22 +00:00
addChild: (BlTextElement new
constraintsDo: [ :c |
c horizontal fitContent ];
margin: (BlInsets top: 5 right: 0 bottom: 5 left: 5);
text: (('@', self userName) asRopedText glamorousRegularFont
fontSize: 20;
foreground: Color black));
addChild: (BrLabel new aptitude: BrGlamorousLabelAptitude; text: self name; beLargeSize);
2021-08-25 14:13:18 +00:00
addChild: (BrLabel new
aptitude: BrGlamorousLabelAptitude; text: 'joined: ', self createdAtShorted);
addChild: (BrLabel new aptitude: BrGlamorousLabelAptitude; text: self description);
addChild: (BrEditor new
constraintsDo: [ :c |
c horizontal matchParent ];
aptitude: BrGlamorousRegularEditorAptitude new;
beReadOnlyWithSelection;
text: String loremIpsum));
when: BlClickEvent do: [:e | e target phlow spawnObject: self tweets]