Re: color icons

2018-03-27 Thread Terry Brown
On Tue, 27 Mar 2018 14:26:36 -0700 (PDT)
jkn  wrote:

> On Tuesday, March 27, 2018 at 6:26:36 PM UTC+1, Terry Brown wrote:
> >
> > https://github.com/leo-editor/snippets/blob/master/examples/tests/make_icons.py
> >  
> >
> > make the simple icons attached.  Intended for dark rather than
> > light background.  Might be useful for other automated icon
> > generation things, seeing it iterates the 16 states in the correct
> > 00..15 order. 
> >
> > Maybe it could be added to .../leo/extensions/ 
> >
> > Still "eating my own dog food" to see if I actually like the
> > icons.  I went with an indicator for nodes with no content, rather
> > than an indicator for nodes with content, seeing the latter's more
> > common and I'm not really sure how important that indicator is
> > anyway... maybe I'll try not indicating that state.  Of course then
> > there's a wasted slot in my 2x2 icon design :-) 
> >
> > Cheers -Terry 
> 
> Do the icons have to be .pngs? I had to make something similar a
> while ago and ended up using  svgwrite to create .svg files,

Not really, well, they might need to be PNG's to work the way Leo uses
them, but from the point of view of generating them with the script, no.

The script really does two things, runs a loop with these values:

(0, ('clean', 'no_clone', 'unmarked', 'empty'))
(1, ('clean', 'no_clone', 'unmarked', 'content'))
(2, ('clean', 'no_clone', 'marked', 'empty'))
(3, ('clean', 'no_clone', 'marked', 'content'))
(4, ('clean', 'clone', 'unmarked', 'empty'))
(5, ('clean', 'clone', 'unmarked', 'content'))
(6, ('clean', 'clone', 'marked', 'empty'))
(7, ('clean', 'clone', 'marked', 'content'))
(8, ('dirty', 'no_clone', 'unmarked', 'empty'))
(9, ('dirty', 'no_clone', 'unmarked', 'content'))
(10, ('dirty', 'no_clone', 'marked', 'empty'))
(11, ('dirty', 'no_clone', 'marked', 'content'))
(12, ('dirty', 'clone', 'unmarked', 'empty'))
(13, ('dirty', 'clone', 'unmarked', 'content'))
(14, ('dirty', 'clone', 'marked', 'empty'))
(15, ('dirty', 'clone', 'marked', 'content'))

and demonstrates their use to make simple 4-color square PNGs using
PIL.  But you could certainly use that loop to generate SVG files in
various ways, maybe hiding / showing pre-drawn elements in an SVG file.

Still the SVG files may need to be rendered to a bitmap format for Leo
to use them, but that's a separate issue.

Cheers -Terry

> and then converting these to .png files. This was the best quality
> route for my purposes. If Qt can accept .svg icons directly they
> might come out nicer, in case this makes any difference.
> 
> SVGwrite documentation 
> 
> J^n

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: color icons

2018-03-27 Thread jkn


On Tuesday, March 27, 2018 at 6:26:36 PM UTC+1, Terry Brown wrote:
>
>
> https://github.com/leo-editor/snippets/blob/master/examples/tests/make_icons.py
>  
>
> make the simple icons attached.  Intended for dark rather than light 
> background.  Might be useful for other automated icon generation 
> things, seeing it iterates the 16 states in the correct 00..15 order. 
>
> Maybe it could be added to .../leo/extensions/ 
>
> Still "eating my own dog food" to see if I actually like the icons.  I 
> went with an indicator for nodes with no content, rather than an 
> indicator for nodes with content, seeing the latter's more common and 
> I'm not really sure how important that indicator is anyway... maybe 
> I'll try not indicating that state.  Of course then there's a wasted 
> slot in my 2x2 icon design :-) 
>
> Cheers -Terry 
>

Do the icons have to be .pngs? I had to make something similar a while ago 
and ended up using  svgwrite to create .svg files,
and then converting these to .png files. This was the best quality route 
for my purposes. If Qt can accept .svg icons directly they
might come out nicer, in case this makes any difference.

SVGwrite documentation 

J^n

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


color icons

2018-03-27 Thread Terry Brown
https://github.com/leo-editor/snippets/blob/master/examples/tests/make_icons.py

make the simple icons attached.  Intended for dark rather than light
background.  Might be useful for other automated icon generation
things, seeing it iterates the 16 states in the correct 00..15 order.

Maybe it could be added to .../leo/extensions/

Still "eating my own dog food" to see if I actually like the icons.  I
went with an indicator for nodes with no content, rather than an
indicator for nodes with content, seeing the latter's more common and
I'm not really sure how important that indicator is anyway... maybe
I'll try not indicating that state.  Of course then there's a wasted
slot in my 2x2 icon design :-)

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.