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@0) + offsets: (8 @ 72 corner: 108 @ 172)). + self addMorph: formDisplayMorph. - self addMorph: formDisplayMorph - fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0@0) - offsets: (8 @ 72 corner: 108 @ 172)). self minimumExtent: 116@180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail!
On Tue, 24 Jan 2017 20:18:19 0000, commits@source.squeak.org commits@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@0)
offsets: (8 @ 72 corner: 108 @ 172)).
- self addMorph: formDisplayMorph.
- self addMorph: formDisplayMorph
fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0@0)
self minimumExtent: 116@180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail!offsets: (8 @ 72 corner: 108 @ 172)).
Unfortunately not a good fix. It gives an emergency evaluator.
How should a fix look like ....?
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
On Tue, 24 Jan 2017 20:18:19 0000, commits@source.squeak.org commits@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@0)
offsets: (8 @ 72 corner: 108 @ 172)).
- self addMorph: formDisplayMorph.
- self addMorph: formDisplayMorph
fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0@0)
self minimumExtent: 116@180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail!offsets: (8 @ 72 corner: 108 @ 172)).
The emergency evaluator might be unrelated to the fix because in Squeak 5.1. the fix has been working fine for a few days now in my image. Squeak 6.0a-16900
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
Unfortunately not a good fix. It gives an emergency evaluator.
How should a fix look like ....?
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
On Tue, 24 Jan 2017 20:18:19 0000, commits@source.squeak.org commits@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@0)
offsets: (8 @ 72 corner: 108 @ 172)).
- self addMorph: formDisplayMorph.
- self addMorph: formDisplayMorph
fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0@0)
self minimumExtent: 116@180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail!offsets: (8 @ 72 corner: 108 @ 172)).
Hello
The fix which allows imported pictures to be displayed with the proper aspect ratio
has been working fine so far since January 24th in my working image.
The bug reported before in the previous mails seemingly was unrelated.
In addition I just retested it in a most recent trunk version (see screen shot).
Could somebody with commit rights please have a look at the fix and move it into trunk?
Thanks,
--Hannes
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
The emergency evaluator might be unrelated to the fix because in Squeak 5.1. the fix has been working fine for a few days now in my image. Squeak 6.0a-16900
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
Unfortunately not a good fix. It gives an emergency evaluator.
How should a fix look like ....?
On 1/24/17, H. Hirzel hannes.hirzel@gmail.com wrote:
On Tue, 24 Jan 2017 20:18:19 0000, commits@source.squeak.org commits@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@0)
offsets: (8 @ 72 corner: 108 @ 172)).
- self addMorph: formDisplayMorph.
- self addMorph: formDisplayMorph
fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 0@0)
self minimumExtent: 116@180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail!offsets: (8 @ 72 corner: 108 @ 172)).
On Tue, Mar 14, 2017 at 09:42:17AM +0100, H. Hirzel wrote:
Hello
The fix which allows imported pictures to be displayed with the proper aspect ratio
has been working fine so far since January 24th in my working image.
The bug reported before in the previous mails seemingly was unrelated.
In addition I just retested it in a most recent trunk version (see screen shot).
Could somebody with commit rights please have a look at the fix and move it into trunk?
Done, and merged.
Thanks, Dave
Thanks for merging.
In connection with checking out Tony's suggested change for the 'Dark solarized theme' I found out that in addition something like
GraphicalDictionaryMenu method
windowColorToUse
^ self userInterfaceTheme defaultWindowColor ifNil: [Color veryVeryLightGray]
is necessary.
However the 'GraphicalDictionaryMenu' (opened through 'Extras/Graphical Imports') menu does not follow the new UserInterfaceTheme conventions, so I'll do some more investigations before I submit another fix.
It will include an updated comment as well.
--Hannes
On 3/15/17, David T. Lewis lewis@mail.msen.com wrote:
On Tue, Mar 14, 2017 at 09:42:17AM +0100, H. Hirzel wrote:
Hello
The fix which allows imported pictures to be displayed with the proper aspect ratio
has been working fine so far since January 24th in my working image.
The bug reported before in the previous mails seemingly was unrelated.
In addition I just retested it in a most recent trunk version (see screen shot).
Could somebody with commit rights please have a look at the fix and move it into trunk?
Done, and merged.
Thanks, Dave
Regarding the note of Tim R. http://lists.squeakfoundation.org/pipermail/squeak-dev/2017-September/195233...
about #windowColor
The 'GraphicalDictionaryMenu' (opened through 'Extras/Graphical Imports') menu
does not follow the new UserInterfaceTheme conventions. If you change the theme, it is not changed in the inspector for graphical imports (pictures loaded into the image).
--Hannes
On 3/15/17, H. Hirzel hannes.hirzel@gmail.com wrote:
Thanks for merging.
In connection with checking out Tony's suggested change for the 'Dark solarized theme' I found out that in addition something like
GraphicalDictionaryMenu method
windowColorToUse
^ self userInterfaceTheme defaultWindowColor ifNil: [Color veryVeryLightGray]
is necessary.
However the 'GraphicalDictionaryMenu' (opened through 'Extras/Graphical Imports') menu does not follow the new UserInterfaceTheme conventions, so I'll do some more investigations before I submit another fix.
It will include an updated comment as well.
--Hannes
On 3/15/17, David T. Lewis lewis@mail.msen.com wrote:
On Tue, Mar 14, 2017 at 09:42:17AM +0100, H. Hirzel wrote:
Hello
The fix which allows imported pictures to be displayed with the proper aspect ratio
has been working fine so far since January 24th in my working image.
The bug reported before in the previous mails seemingly was unrelated.
In addition I just retested it in a most recent trunk version (see screen shot).
Could somebody with commit rights please have a look at the fix and move it into trunk?
Done, and merged.
Thanks, Dave
squeak-dev@lists.squeakfoundation.org