Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix displaying screenshot of Pharo #1335

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
seasideMimeDocumentType: aMimeType
"Converts the receiver to a WAMimeDocument. The argument should ideally be an instance for WAMimeType. For various crappy reasons Strings and nil are also allowed."

| aStream writer |
aStream := GRPlatform current readWriteByteStream.
| writer content |
writer := self writerForMimeType: aMimeType seasideMimeType.
writer isNil ifTrue: [ self error: 'no writer for ', aMimeType greaseString, ' found' ].
writer putForm: (self asFormOfDepth: 32) onStream: aStream.
^ WAMimeDocument on: aStream contents mimeType: aMimeType
content := ByteArray streamContents: [ :stream |
writer putForm: (self asFormOfDepth: 32) onStream: stream ].
^ WAMimeDocument on: content mimeType: aMimeType
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
form
^ zoom
ifFalse: [ Display copy ]
ifFalse: [ UIManager default world imageForm ]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more or less trial and error. I'm not sure this is actually the right way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works, it works

ifTrue: [ self topWindow imageForm ]