Hi Damien, Benjamin.V.R.
I see in "PharoLauncher-Spec-DamienCassou.17" that the layout of the toolbar buttons is fixed, which is really great. However in trying to learn from that for future reference, seeing it relies on an empty column being added "seems" like a hack to workaround some issue with Spec. Should that be logged as a bug? Or is there some greater architectural background for this that I am missing? PhLCommandTooldbar>>dynamicLayout "(newer)" "Create a spec layout with 1 row, and as many columns as there are command classes" ^ SpecLayout composed newRow: [ :r | r newColumn: [ :col | ]. "<--------FIX" self commandClasses do: [ :commandClass | r add: commandClass specId width: self class toolbarHeight ] ] I tried digging into Spec to look at this myself, and my naive intuition felt it was something to do with initialization of LayoutFrames, but that was my first exposure to LayoutFrame and I quickly got lost. However I was reminded of Igor commenting "i only know that if you using proportional layout, then if you want submorphs to be laid down properly, you must use addMorph:fullFrame: instead of just addMorph:" [1] I tried this with a few hacks, but tit was really shooting in the dark and unsuccessful. [1] https://www.mail-archive.com/pharo-dev@.../msg08838.html cheers -ben PharoLauncher-fixed-button-layout.png (40K) Download Attachment |
The empty column is used as a \hFill :)
Ben On 12 Dec 2013, at 13:57, [hidden email] wrote: Hi Damien, Benjamin.V.R. |
Thanks Ben. But why is it required? I think I am missing some basic
info how layouts work on the Morph side, and the few references to
#hFill in the image don't tell me much.
btw, adding a method #hFill would make it look like less of a hack. cheers -ben Benjamin wrote: The empty column is used as a \hFill :) |
I was referencing to the LaTeX command \hfill
Ben On 12 Dec 2013, at 14:48, [hidden email] wrote:
|
okay. thanks.
Benjamin wrote: I was referencing to the LaTeX command \hfill |
Free forum by Nabble | Edit this page |