[squeak-dev] The Inbox: MorphicExtras-hjh.202.mcz
H. Hirzel
hannes.hirzel at gmail.com
Tue Jan 24 20:20:00 UTC 2017
On Tue, 24 Jan 2017 20:18:19 0000, commits at source.squeak.org
<commits at source.squeak.org> wrote:
> A new version of MorphicExtras was added to project The Inbox:
> http://source.squeak.org/inbox/MorphicExtras-hjh.202.mcz
>
> ==================== Summary ====================
>
> Name: MorphicExtras-hjh.202
> Author: hjh
> Time: 24 January 2017, 9:18:04.266965 pm
> UUID: 790dbeec-ba66-4070-b51f-a0225aef4a9f
> Ancestors: MorphicExtras-cmm.201
>
> Maintain aspect ratio in thumbnail display of imported graphic
>
> =============== Diff against MorphicExtras-cmm.201 ===============
>
> Item was changed:
> ----- Method: GraphicalDictionaryMenu>>initializeFor:fromDictionary: (in
> category 'initialization') -----
> initializeFor: aTarget fromDictionary: aDictionary
> "Initialize me for a target and a dictionary."
>
> | anIndex aButton |
> self baseDictionary: aDictionary.
> target := aTarget.
> coexistWithOriginal := true.
> self extent: 210 @ 210.
> self clipSubmorphs: true.
> self layoutPolicy: ProportionalLayout new.
> aButton := (IconicButton new)
> borderWidth: 0;
> labelGraphic: (ScriptingSystem formAtKey: 'TinyMenu');
> color: Color transparent;
> actWhen: #buttonDown;
> actionSelector: #showMenu;
> target: self;
> setBalloonText: 'menu'.
> self addMorph: aButton
> fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0)
> offsets: (-50 @ 6 extent: aButton extent)).
> aButton := (SimpleButtonMorph new)
> target: self;
> borderColor: Color black;
> label: 'Prev';
> actionSelector: #downArrowHit;
> actWhen: #whilePressed;
> setBalloonText: 'show previous picture';
> yourself.
> self addMorph: aButton
> fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0)
> offsets: (-24 @ 4 extent: aButton extent)).
> aButton := (SimpleButtonMorph new)
> target: self;
> borderColor: Color black;
> label: 'Next';
> actionSelector: #upArrowHit;
> actWhen: #whilePressed;
> setBalloonText: 'show next pictutre'.
> self addMorph: aButton
> fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0)
> offsets: (24 @ 4 extent: aButton extent)).
> self addMorph: ((UpdatingStringMorph new)
> contents: ' ';
> target: self;
> putSelector: #renameGraphicTo:;
> getSelector: #truncatedNameOfGraphic;
> useStringFormat;
> setBalloonText: 'The name of the current graphic';
> yourself)
> fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0)
> offsets: (10 @ 40 corner: -10 @ 60)).
> self addMorph: ((Morph new)
> extent: 100 @ 4;
> color: Color black)
> fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0)
> offsets: (0 @ 60 corner: 0 @ 64)).
> formDisplayMorph := (Thumbnail new)
> extent: 100 @ 100;
> useInterpolation: true;
> maxWidth: 3000 minHeight: 100;
> yourself.
> + formDisplayMorph layoutFrame:
> + (LayoutFrame fractions: (0 @ 0 extent: 0 at 0)
> + offsets: (8 @ 72 corner: 108 @ 172)).
> + self addMorph: formDisplayMorph.
> - self addMorph: formDisplayMorph
> - fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0 at 0)
> - offsets: (8 @ 72 corner: 108 @ 172)).
> self minimumExtent: 116 at 180.
> target ifNotNil:
> [(anIndex := formChoices indexOf: target form ifAbsent: [])
> ifNotNil: [currentIndex := anIndex]].
> self updateThumbnail!
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Graphical_Imports_Before_2017-01-24 20:56:44.png
Type: image/png
Size: 23718 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170124/08e65c3e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: After_Aspect_Ratio_Fix_2017-01-24 20:59:14.png
Type: image/png
Size: 21811 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170124/08e65c3e/attachment-0003.png>
More information about the Squeak-dev
mailing list
|