[Glamour] default selection in ListPresentation
by Cyrille Delaunay
Hello,
Is there a way to set a default selection to a list presentation? so that
when I open the browser, the morphic list has already a value selected.
I tried that:
|tmpBrowser|
tmpBrowser := GLMTabulator new.
tmpBrowser row: #list.
tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).
but the list still open with nothing selected
5 years, 2 months
Theme aware-ish TRMorph
by Peter Uhnák
Hi,
since I wanted to use DarkTheme I played around with TRMorph (since seeing
giant white rectangle in dark theme is not very nice).
What I have done is moved the background color setting to `surface clear:`
(instead of the original aCanvas fillRectangle).
And then if theme background luminance is dark (>0.5), I invert all the
colors in the visualization.
For dark theme the background is black, and not the theme background - at
least to me it seems that black is much clearer.
Is this something that could be incorporated?
And the modified code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"protocol: drawing"
TRMorph>>drawOn: aCanvas
"aCanvas is a FormCanvas"
self checkSession.
"aCanvas fillRectangle: bounds color: trachelCanvas color."
trachelCanvas playAnimations.
"The drawing has to be done when a change in the shapes occured or when
there is an animation."
surface drawDuring: [:cs |
surface clear: trachelCanvas color.
"We display the elements that are subject to the camera"
cs pathTransform
translateBy: (self extent / 2) asFloatPoint;
scaleBy: trachelCanvas camera scale asFloat;
translateBy: trachelCanvas camera position negated asFloatPoint.
trachelCanvas shapes do: [ :trachelShape |
trachelShape drawOn: cs.
].
"We display the elements that are _NOT_ subject to the camera"
cs pathTransform loadIdentity scaleBy: 1.001.
trachelCanvas fixedShapes do: [ :trachelShape |
trachelShape drawOn: cs.
].
].
self theme backgroundColor luminance < 0.5 ifTrue: [
surface drawDuring: [ :cs |
cs paintMode restoreAfter: [
cs setPaint: Color white.
cs paintMode difference.
cs drawShape: (0 @ 0 extent: surface extent)
]
]
].
"aCanvas translucentImage: surface asForm at: self bounds origin."
"asForm creates a new Form, which is likely to be expensive. This can be
cached"
aCanvas image: surface asForm at: self bounds origin sourceRect: (0 @ 0
extent: surface extent) rule: 34.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 years, 3 months
Finding in a roassal view
by Alexandre Bergel
Hi!
I have worked on the actions available in Glamour during the last few days.
I have just added a find icon (glasses icon):
Clicking on it open a spotter to look for element in the view. Selecting it move the camera to focus on it.
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
7 years, 6 months
showing a diff on #assert:equals:
by Andrei Chis
Hi,
I updated GTDebugger to automatically show a diff in the debugger when an
#assert:equals: fails.
For example if you execute '(GTSUnitExampleFailingTest selector:
#testMultiValuedStreaming) debug.' you get the debugger below. Also works
when running tests from Nautilus/TestRunner.
The context from where #assert:equals: was called is also automatically
selected.
[image: Inline image 1]
Let me know if you run into any issues.
Cheers,
Andrei
7 years, 6 months
broken Roassal2Spec Adapter
by Peter Uhnák
Hi,
apparently we broke MorphicRoassalAdapter when cleaning Spec, I attached a
fix.
However my question is - does anybody (except us) actually use the
Roassal2Spec package? Because otherwise we could clean it a bit. For
example I'm not sure of the use case of script:/lastEvent:.
Peter
7 years, 6 months
Editing methods in the inspector
by Alexandre Bergel
Hi!
If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
Is there a way to edit compile method within the GTInspector?
Maybe using Ring?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
7 years, 6 months
graph library in Pharo
by Peter Uhnak
Hi,
is there any graph library for pharo with algorithms for planarity
testing, spanning trees, flow costs, etc.?
Thanks,
--
Peter
7 years, 6 months
Stack visualizations
by Hernán Morales Durand
Dear Roassal users and developers,
I'm using Roassal in Pharo 4 and want to stack visualizations, something
like:
| stack1 stack2 |
stack1 := RTStackBarPlot new.
stack1 add: #(1 2 3 4).
stack1 add: #(4 3 2 1).
stack1 add: #(5 3 2 0).
stack1 build.
stack2 := RTStackBarPlot new.
stack2 add: #(2 2 3 1).
stack2 add: #(4 3 2 2).
stack2 add: #(6 1 2 0).
stack2 build.
^ (stack1 , stack2) view
or
stack1 append: stack2
is this currently possible?
Cheers
Hernán
7 years, 6 months
Matrix sunburst: increasing the separation between arcs
by Offray Vladimir Luna Cárdenas
Hi,
Pair programming with Milton at Smalltalks 2015, we (well mostly he)
came with what I call a "matrix sunburst" that shows a sunburst diagram
using a matrix instead of a tree as data source (the clever hack of
Milton was to convert the data in the matrix to a tree with only one
child on any branch after the first one!). The inspiration was taken
from [1] and the idea was from a friend who want to use this kind of
matrix alike sunburst to compare public medicine information.
[1]
http://www.theguardian.com/world/interactive/2012/may/08/gay-rights-unite...
With this I can create thinks like this:
But to get a more readable visualization, I would like to make two things:
a. Increase the empty space between arcs, not like the current radial
strategy, but more like the graphic at [1]. For this we thought in
adding a RTEdge with the same color as the background. How can I
calculate the position of every RTEdge at the final of each arch in the
sunburst?
b. I would like to keep each ring of the same size instead of making
them narrower as the become more away of the center. It this possible?
c. Finally I have created RTSunburstBuilder>>exploreMatrix: aMatrix
coloredWith: aColorPalette in my own image, because I think that is the
best place it can be to be reused in my own visualizations. Is this a
good practice? Can I share this code back with the Roassal project? How?
(hopefully I will not need to learn git and its gratituous complexity).
Cheers,
Offray
7 years, 6 months