[squeak-dev] Re: rice paper background in trunk?
marcel.taeumel
Marcel.Taeumel at hpi.de
Mon Jul 11 12:23:39 UTC 2016
David T. Lewis wrote
> On Mon, Jul 11, 2016 at 03:38:42AM -0700, marcel.taeumel wrote:
>> Bert Freudenberg wrote
>> > On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda <
>>
>> > eliot.miranda@
>>
>> > >
>> > wrote:
>> >>
>> >> I *hate* the grey.
>> >>
>> >
>> > +1
>> >
>> > - Bert -
>>
>> Hi there.
>>
>> It seems that setting up custom backgrounds seems to be too difficult.
>> There
>> is, obviously, no way to capture the taste of any possible user with a
>> default background. So, we might want to provide some alternatives.
>> Hmmm...
>>
>> For a single project, you can just drag-drop any picture into Squeak,
>> then
>> right-click and choose "Set as background". This way seems to be useful
>> because many of our students configured their desktops quite nicely.
>>
>> You can also choose any color as you project background. Is this
>> difficult
>> to discover?
>>
>> Anyway, there is no reason why we couldn't provide a set of three (?)
>> alternative patterns for the default background. Maybe as simple as
>> switching between uniform window colors and colorful windows.
>>
>
> That sounds like a good idea. I would like to be able to change the
> background pattern, but I rarely bother doing so. If I had a few choices
> easily available in the image, that is something that I would be happy
> to use.
>
> Dave
Try this:
| patterns index pattern |
Installer ss
project: 'JSON';
install: 'JSON'.
patterns := Json readFrom: (WebClient httpGet:
'https://api.github.com/repos/subtlepatterns/SubtlePatterns/contents')
content readStream.
index := ListChooser chooseIndexFrom: (patterns select: [:ea | (ea at:
#name) endsWith: '.png'] thenCollect: [:ea | '{1} ({2} bytes)' format: {ea
at: #name. ea at: #size}]) title: 'Select pattern for background'.
index > 0 ifTrue: [
| base64Content |
base64Content := (Json readFrom: (WebClient httpGet: ((patterns at: index)
at: #'git_url')) content readStream) at: #content.
pattern := Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes:
base64Content readStream).
ReleaseBuilder setProjectBackground: pattern].
Best,
Marcel
--
View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4905984.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|