<div dir="ltr">Also the ObjectsTool breaks if you rescale it with the halo. It does not shrink down to fit bounds.<div><br></div><div>Best,</div><div>Karl</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jun 9, 2018 at 12:38 AM Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was noticing that pink thing, too, and wanting to go even further.<br>
Would you mind if we used UserInterfaceTheme for the colors?<br>
On Fri, Jun 8, 2018 at 10:02 AM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br>
><br>
> Patrick Rein uploaded a new version of MorphicExtras to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/MorphicExtras-pre.239.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/MorphicExtras-pre.239.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: MorphicExtras-pre.239<br>
> Author: pre<br>
> Time: 8 June 2018, 5:01:33.701586 pm<br>
> UUID: d0190a6c-3ee5-824f-8bda-fee68d823a6a<br>
> Ancestors: MorphicExtras-pre.238<br>
><br>
> Minor refactoring of objects tool. This moves a objects tool method from Morph into the ObjectsTool. Other very minor style fixes.<br>
><br>
> =============== Diff against MorphicExtras-pre.238 ===============<br>
><br>
> Item was changed:<br>
> ----- Method: BorderedMorph>>basicInitialize (in category '*MorphicExtras-initialization') -----<br>
> basicInitialize<br>
> "Do basic generic initialization of the instance variables"<br>
> +<br>
> super basicInitialize.<br>
> - ""<br>
> self borderInitialize!<br>
><br>
> Item was removed:<br>
> - ----- Method: Morph>>highlightOnlySubmorph: (in category '*MorphicExtras-accessing') -----<br>
> - highlightOnlySubmorph: aMorph<br>
> - "Distinguish only aMorph with border highlighting (2-pixel wide red); make all my other submorphs have one-pixel-black highlighting. This is a rather special-purpose and hard-coded highlighting regime, of course. Later, if someone cared to do it, we could parameterize the widths and colors via properties, or some such."<br>
> -<br>
> - self submorphs do:<br>
> - [:m |<br>
> - m == aMorph<br>
> - ifTrue: [m borderWidth: 1; borderColor: Color red. m firstSubmorph color: Color red]<br>
> - ifFalse: [m borderWidth: 1; borderColor: Color black. m firstSubmorph color: Color black]<br>
> - ].<br>
> - !<br>
><br>
> Item was added:<br>
> + ----- Method: ObjectsTool>>buttonActiveColor (in category 'constants') -----<br>
> + buttonActiveColor<br>
> +<br>
> + ^ Color white!<br>
><br>
> Item was added:<br>
> + ----- Method: ObjectsTool>>buttonColor (in category 'constants') -----<br>
> + buttonColor<br>
> +<br>
> + ^ Color black!<br>
><br>
> Item was added:<br>
> + ----- Method: ObjectsTool>>highlightOnlySubmorph:in: (in category 'tabs') -----<br>
> + highlightOnlySubmorph: aMorph in: anotherMorph<br>
> + "Distinguish only aMorph with border highlighting (2-pixel wide red); make all my other submorphs have one-pixel-black highlighting. This is a rather special-purpose and hard-coded highlighting regime, of course. Later, if someone cared to do it, we could parameterize the widths and colors via properties, or some such."<br>
> +<br>
> + anotherMorph submorphs do: [:m | | color |<br>
> + color := m == aMorph ifTrue: [self buttonActiveColor] ifFalse: [self buttonColor].<br>
> + m<br>
> + borderWidth: 1;<br>
> + borderColor: color.<br>
> + m firstSubmorph color: color]<br>
> + !<br>
><br>
> Item was changed:<br>
> ----- Method: ObjectsTool>>installQuads:fromButton: (in category 'alphabetic') -----<br>
> installQuads: quads fromButton: aButton<br>
> "Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button"<br>
><br>
> | aPartsBin sortedQuads oldResizing |<br>
> aPartsBin := self partsBin.<br>
> oldResizing := aPartsBin vResizing.<br>
> aPartsBin removeAllMorphs.<br>
> sortedQuads := ((PartsBin translatedQuads: quads)<br>
> select: [ :each | Smalltalk hasClassNamed: each first ])<br>
> sort: [ :a :b | a third < b third ].<br>
> aPartsBin listDirection: #leftToRight quadList: sortedQuads.<br>
> + aButton ifNotNil: [self highlightOnlySubmorph: aButton in: self tabsPane].<br>
> - aButton ifNotNil: [self tabsPane highlightOnlySubmorph: aButton].<br>
> aPartsBin vResizing: oldResizing.<br>
> aPartsBin layoutChanged; fullBounds.<br>
> self isFlap ifFalse: [ self minimizePartsBinSize ].!<br>
><br>
> Item was changed:<br>
> ----- Method: ObjectsTool>>tweakAppearanceAfterModeShift (in category 'initialization') -----<br>
> tweakAppearanceAfterModeShift<br>
> "After the receiver has been put into a given mode, make an initial selection of category, if appropriate, and highlight the mode button."<br>
> +<br>
> -<br>
> self buttonPane submorphs do:<br>
> [:aButton |<br>
> | aColor |<br>
> "aButton borderWidth: 1."<br>
> aColor := (aButton valueOfProperty: #modeSymbol) = modeSymbol<br>
> + ifTrue: [self buttonActiveColor]<br>
> + ifFalse: [self buttonColor].<br>
> - ifTrue: [Color red]<br>
> - ifFalse: [Color black].<br>
><br>
> aButton firstSubmorph color: aColor.<br>
> + aButton borderColor: aColor].!<br>
> - aButton borderColor: aColor.<br>
> - ].!<br>
><br>
><br>
<br>
</blockquote></div>