2021-08-27 21:35:30 +00:00
|
|
|
accessing
|
2021-08-22 01:52:32 +00:00
|
|
|
asCardElement
|
2021-08-27 22:32:28 +00:00
|
|
|
| aModeLook anEditor textInfoPane buttonsPane |
|
2021-08-27 21:35:30 +00:00
|
|
|
|
|
|
|
aModeLook := BrEditorModeAptitude new
|
|
|
|
editableFocused: [ :aWidget | aWidget border: (BlBorder paint: BrGlamorousColors focusedEditorBorderColor width: 1) ];
|
|
|
|
editableUnfocused: [ :aWidget | aWidget border: (BlBorder paint: BrGlamorousColors editorBorderColor width: 1) ];
|
|
|
|
readOnly: [ :aWidget | aWidget border: BlBorder empty ].
|
|
|
|
|
|
|
|
anEditor := BrEditor new
|
|
|
|
aptitude: BrGlamorousRegularEditorAptitude new + aModeLook;
|
|
|
|
text: self description;
|
|
|
|
vFitContent.
|
|
|
|
|
|
|
|
textInfoPane := BrVerticalPane new
|
|
|
|
hMatchParent;
|
|
|
|
vFitContent;
|
|
|
|
margin: (BlInsets left: 20);
|
|
|
|
addChild: (BrLabel new
|
|
|
|
aptitude: BrGlamorousLabelAptitude;
|
|
|
|
text: '@' , self userName ;
|
|
|
|
beHugeSize);
|
|
|
|
addChild: (BrLabel new
|
|
|
|
aptitude: BrGlamorousLabelAptitude;
|
|
|
|
text: self name;
|
|
|
|
beLargeSize);
|
|
|
|
addChild: (BrLabel new
|
|
|
|
aptitude: BrGlamorousLabelAptitude;
|
|
|
|
text: 'Joined: ' , self createdAtShorted );
|
2021-08-27 22:32:28 +00:00
|
|
|
addChild: anEditor.
|
|
|
|
buttonsPane := BrHorizontalPane new
|
|
|
|
fitContent;
|
|
|
|
cellSpacing: 5;
|
|
|
|
addChildren: {
|
|
|
|
BrButton new
|
|
|
|
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
|
|
|
label: 'Tweets';
|
|
|
|
action: [ :e | e phlow spawnObject: self tweets ].
|
|
|
|
BrButton new
|
|
|
|
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
|
|
|
label: 'Web view';
|
|
|
|
action: [ self webView ].
|
|
|
|
}.
|
2021-08-27 21:35:30 +00:00
|
|
|
|
|
|
|
^ BrHorizontalPane new
|
|
|
|
padding: (BlInsets all: 15);
|
|
|
|
margin: (BlInsets all: 10);
|
|
|
|
cellSpacing: 5;
|
|
|
|
hMatchParent;
|
2021-08-22 01:52:32 +00:00
|
|
|
vFitContent;
|
2021-08-27 21:35:30 +00:00
|
|
|
addChildren: {
|
|
|
|
(self profileImage asElement asScalableElement size: 124 @ 124).
|
|
|
|
BrVerticalPane new
|
|
|
|
cellSpacing: 5;
|
|
|
|
hMatchParent;
|
|
|
|
vFitContent;
|
|
|
|
addChildren: {
|
2021-08-27 22:32:28 +00:00
|
|
|
buttonsPane.
|
2021-08-27 21:35:30 +00:00
|
|
|
textInfoPane.
|
|
|
|
}
|
|
|
|
}
|