UI: Placement and modularity. Starting user groups.
This commit is contained in:
parent
3134c006e6
commit
fc5f13e8d2
@ -1,6 +1,6 @@
|
||||
accessing
|
||||
asCardElement
|
||||
| aModeLook anEditor textInfoPane |
|
||||
| aModeLook anEditor textInfoPane buttonsPane |
|
||||
|
||||
aModeLook := BrEditorModeAptitude new
|
||||
editableFocused: [ :aWidget | aWidget border: (BlBorder paint: BrGlamorousColors focusedEditorBorderColor width: 1) ];
|
||||
@ -21,22 +21,7 @@ asCardElement
|
||||
text: '@' , self user userName , ' | ' , self created asString;
|
||||
beSmallSize);
|
||||
addChild: anEditor.
|
||||
|
||||
^ BrHorizontalPane new
|
||||
padding: (BlInsets all: 15);
|
||||
margin: (BlInsets all: 10);
|
||||
cellSpacing: 5;
|
||||
hMatchParent;
|
||||
vFitContent;
|
||||
addChildren: {
|
||||
(self user profileImage asElement asScalableElement size: 64 @ 64).
|
||||
BrVerticalPane new
|
||||
cellSpacing: 5;
|
||||
hMatchParent;
|
||||
vFitContent;
|
||||
addChildren: {
|
||||
textInfoPane.
|
||||
BrHorizontalPane new
|
||||
buttonsPane := BrHorizontalPane new
|
||||
fitContent;
|
||||
cellSpacing: 5;
|
||||
addChildren: {
|
||||
@ -56,6 +41,22 @@ asCardElement
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Web view';
|
||||
action: [ self webView ].
|
||||
}.
|
||||
|
||||
^ BrHorizontalPane new
|
||||
padding: (BlInsets all: 15);
|
||||
margin: (BlInsets all: 10);
|
||||
cellSpacing: 5;
|
||||
hMatchParent;
|
||||
vFitContent;
|
||||
addChildren: {
|
||||
(self user profileImage asElement asScalableElement size: 64 @ 64).
|
||||
BrVerticalPane new
|
||||
cellSpacing: 5;
|
||||
hMatchParent;
|
||||
vFitContent;
|
||||
addChildren: {
|
||||
buttonsPane.
|
||||
textInfoPane.
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
addToGroup: aTwitterUsersGroup
|
||||
self groups add: aTwitterUsersGroup
|
@ -1,6 +1,6 @@
|
||||
accessing
|
||||
asCardElement
|
||||
| aModeLook anEditor textInfoPane |
|
||||
| aModeLook anEditor textInfoPane buttonsPane |
|
||||
|
||||
aModeLook := BrEditorModeAptitude new
|
||||
editableFocused: [ :aWidget | aWidget border: (BlBorder paint: BrGlamorousColors focusedEditorBorderColor width: 1) ];
|
||||
@ -28,6 +28,19 @@ asCardElement
|
||||
aptitude: BrGlamorousLabelAptitude;
|
||||
text: 'Joined: ' , self createdAtShorted );
|
||||
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 ].
|
||||
}.
|
||||
|
||||
^ BrHorizontalPane new
|
||||
padding: (BlInsets all: 15);
|
||||
@ -42,19 +55,7 @@ asCardElement
|
||||
hMatchParent;
|
||||
vFitContent;
|
||||
addChildren: {
|
||||
buttonsPane.
|
||||
textInfoPane.
|
||||
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 ].
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
groups: aTwitterUsersGroupCollection
|
||||
groups := aTwitterUsersGroupCollection
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
groups
|
||||
^ groups ifNil: [ groups := OrderedCollection new]
|
@ -13,7 +13,8 @@
|
||||
"description",
|
||||
"metrics",
|
||||
"tweets",
|
||||
"createdAt"
|
||||
"createdAt",
|
||||
"groups"
|
||||
],
|
||||
"name" : "TwitterUser",
|
||||
"type" : "normal"
|
||||
|
Loading…
Reference in New Issue
Block a user