Minor Tweet UI/UX improvements.
This commit is contained in:
parent
c7e5d66f10
commit
3853c3e9fc
@ -1,39 +1,4 @@
|
||||
accessing
|
||||
asCardElement
|
||||
|
||||
^ BrHorizontalPane new
|
||||
hFitContent;
|
||||
vFitContent;
|
||||
padding: (BlInsets all: 15);
|
||||
margin: (BlInsets all: 10);
|
||||
addChild:
|
||||
(self user profileImage asElement asScalableElement size: 64 @ 64);
|
||||
addChild: (BrVerticalPane new
|
||||
exact: 250;
|
||||
margin: (BlInsets left: 20);
|
||||
addChild: (BrLabel new
|
||||
aptitude: BrGlamorousLabelAptitude;
|
||||
text: '@' , self user userName , ' | ' , self created asString;
|
||||
beSmallSize);
|
||||
addChild: (BrEditor new
|
||||
aptitude: BrGlamorousRegularEditorAptitude new;
|
||||
beReadOnlyWithSelection;
|
||||
text: self text);
|
||||
addChild:(BrHorizontalPane new
|
||||
fitContent;
|
||||
cellSpacing: 5;
|
||||
addChildren: {
|
||||
BrButton new
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Toggle subtopics';
|
||||
action: [ "anEditor beEditable" ].
|
||||
BrButton new
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Add subtopic keyword';
|
||||
action: [ "anEditor beReadOnlyWithSelection" ].
|
||||
BrButton new
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Web view';
|
||||
action: [ "anEditor beReadOnlyWithoutSelection" ]
|
||||
}));
|
||||
when: BlClickEvent do: [ :e | e target phlow spawnObject: self ]
|
||||
^ self asTestCardElement
|
@ -52,11 +52,11 @@ asTestCardElement
|
||||
BrButton new
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Details';
|
||||
action: [ anEditor beReadOnlyWithSelection ].
|
||||
action: [ :e | e phlow spawnObject: self ].
|
||||
BrButton new
|
||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||
label: 'Web view';
|
||||
action: [ anEditor beReadOnlyWithoutSelection ].
|
||||
action: [ self webView ].
|
||||
}
|
||||
}
|
||||
}
|
3
Datanalitica.package/Tweet.class/instance/id.st
Normal file
3
Datanalitica.package/Tweet.class/instance/id.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
id
|
||||
^ id
|
3
Datanalitica.package/Tweet.class/instance/webView.st
Normal file
3
Datanalitica.package/Tweet.class/instance/webView.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
webView
|
||||
WebBrowser openOn: 'https://twitter.com/', self user userName, '/status/', self id
|
@ -14,12 +14,11 @@ gtTweetsFor: aView
|
||||
self tweets do: [ :each |
|
||||
imageContainer := BlLazyElement new
|
||||
withGlamorousPreview;
|
||||
aptitude: BrShadowAptitude new;
|
||||
background: Color white;
|
||||
|
||||
margin: (BlInsets all: 20);
|
||||
aptitude: BrShadowAptitude new;
|
||||
background: Color white;
|
||||
margin: (BlInsets all: 10);
|
||||
constraintsDo: [ :c |
|
||||
c vertical exact: 200.
|
||||
c vertical exact: 135.
|
||||
c horizontal matchParent ];
|
||||
elementBuilder: [ each asTestCardElement margin: (BlInsets all: 20) ].
|
||||
container addChild: imageContainer].
|
||||
|
Loading…
Reference in New Issue
Block a user