[squeak-dev] The Trunk: MorphicExtras-pre.239.mcz
Chris Muller
asqueaker at gmail.com
Fri Jun 8 22:37:37 UTC 2018
I was noticing that pink thing, too, and wanting to go even further.
Would you mind if we used UserInterfaceTheme for the colors?
On Fri, Jun 8, 2018 at 10:02 AM <commits at source.squeak.org> wrote:
>
> Patrick Rein uploaded a new version of MorphicExtras to project The Trunk:
> http://source.squeak.org/trunk/MorphicExtras-pre.239.mcz
>
> ==================== Summary ====================
>
> Name: MorphicExtras-pre.239
> Author: pre
> Time: 8 June 2018, 5:01:33.701586 pm
> UUID: d0190a6c-3ee5-824f-8bda-fee68d823a6a
> Ancestors: MorphicExtras-pre.238
>
> Minor refactoring of objects tool. This moves a objects tool method from Morph into the ObjectsTool. Other very minor style fixes.
>
> =============== Diff against MorphicExtras-pre.238 ===============
>
> Item was changed:
> ----- Method: BorderedMorph>>basicInitialize (in category '*MorphicExtras-initialization') -----
> basicInitialize
> "Do basic generic initialization of the instance variables"
> +
> super basicInitialize.
> - ""
> self borderInitialize!
>
> Item was removed:
> - ----- Method: Morph>>highlightOnlySubmorph: (in category '*MorphicExtras-accessing') -----
> - highlightOnlySubmorph: aMorph
> - "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."
> -
> - self submorphs do:
> - [:m |
> - m == aMorph
> - ifTrue: [m borderWidth: 1; borderColor: Color red. m firstSubmorph color: Color red]
> - ifFalse: [m borderWidth: 1; borderColor: Color black. m firstSubmorph color: Color black]
> - ].
> - !
>
> Item was added:
> + ----- Method: ObjectsTool>>buttonActiveColor (in category 'constants') -----
> + buttonActiveColor
> +
> + ^ Color white!
>
> Item was added:
> + ----- Method: ObjectsTool>>buttonColor (in category 'constants') -----
> + buttonColor
> +
> + ^ Color black!
>
> Item was added:
> + ----- Method: ObjectsTool>>highlightOnlySubmorph:in: (in category 'tabs') -----
> + highlightOnlySubmorph: aMorph in: anotherMorph
> + "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."
> +
> + anotherMorph submorphs do: [:m | | color |
> + color := m == aMorph ifTrue: [self buttonActiveColor] ifFalse: [self buttonColor].
> + m
> + borderWidth: 1;
> + borderColor: color.
> + m firstSubmorph color: color]
> + !
>
> Item was changed:
> ----- Method: ObjectsTool>>installQuads:fromButton: (in category 'alphabetic') -----
> installQuads: quads fromButton: aButton
> "Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button"
>
> | aPartsBin sortedQuads oldResizing |
> aPartsBin := self partsBin.
> oldResizing := aPartsBin vResizing.
> aPartsBin removeAllMorphs.
> sortedQuads := ((PartsBin translatedQuads: quads)
> select: [ :each | Smalltalk hasClassNamed: each first ])
> sort: [ :a :b | a third < b third ].
> aPartsBin listDirection: #leftToRight quadList: sortedQuads.
> + aButton ifNotNil: [self highlightOnlySubmorph: aButton in: self tabsPane].
> - aButton ifNotNil: [self tabsPane highlightOnlySubmorph: aButton].
> aPartsBin vResizing: oldResizing.
> aPartsBin layoutChanged; fullBounds.
> self isFlap ifFalse: [ self minimizePartsBinSize ].!
>
> Item was changed:
> ----- Method: ObjectsTool>>tweakAppearanceAfterModeShift (in category 'initialization') -----
> tweakAppearanceAfterModeShift
> "After the receiver has been put into a given mode, make an initial selection of category, if appropriate, and highlight the mode button."
> +
> -
> self buttonPane submorphs do:
> [:aButton |
> | aColor |
> "aButton borderWidth: 1."
> aColor := (aButton valueOfProperty: #modeSymbol) = modeSymbol
> + ifTrue: [self buttonActiveColor]
> + ifFalse: [self buttonColor].
> - ifTrue: [Color red]
> - ifFalse: [Color black].
>
> aButton firstSubmorph color: aColor.
> + aButton borderColor: aColor].!
> - aButton borderColor: aColor.
> - ].!
>
>
More information about the Squeak-dev
mailing list
|