gotcha

Author Topic: Icons for a dark theme  (Read 10791 times)

March 01, 2018, 01:30:32 PM
Reply #25

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
Really sad, indeed.  :beg:

Anyway, below an example with the actual "nightly build" theme (except the last, I didn't draw it yet). I changed the color to dark blue, because it's better than black. But it's a pain because I have to:
- change my group names' tag in order to be the same as the ID name.
- change the group to a layer via the "Objects" dialog.
- After that I put each layer to the top level.
- And then I save_as "layer to separate svg file".
- Extract all files from the .tar created.
- resize the canvas for each file, clean unused defs, save.

Pretty long isn't it?  :hh:

My point is: If I have to change the color for a reason, I have to change the palette for each file -> very long and boring.

A batch is possible?

I'd like to have a single .svg with all icons and when the program is starting, it checks individual files, then groups in icons.svg if an individual file doesn't exist. This way, it mill be much easier to share packs, and quickly change colors if wanted. Edit: No, in fact. But you get the idea.

By the way, is a theme gtk 3.0 creator available somewhere to make our own themes for Inkscape? That could be great (and useful).
« Last Edit: March 02, 2018, 02:37:36 PM by Teto, Reason: bad english »
  • 0.92.2
  • Windows 7

March 03, 2018, 01:25:40 PM
Reply #26

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Wrote this the day before yesterday already, but the forum didn't work at the time, hope it will now.

> A batch is possible?

- Yes, for every step, except the ID.

What you need for a uniform icon size, though, is an invisible square that is always of the same size, grouped with the icon.
And you need to use swatches for the colors.

You can automatically:

- select an object via Inkscape commandline (if you know its ID)
- then export that object to SVG (development version only, though), or invert the selection and delete everything else, then reselect object.
- use resize page to object (this is why you need the rectangle, to determine the page size) to adjust the size
- if using 0.92.x Save the file (unfortunately, you need to work on a copy, in 0.92, you cannot export part of the drawing to SVG)

- use a text editing tool like sed or awk to replace the swatch colors quickly in multiple files

As for themeing:
Only the master branch is gtk3, so Inkscape 0.93 will be using it.
Only parts of the user interface are - in the development version - adaptable currently.
Don't know how to best edit the gtkrc files... I'd use a text editor.

March 03, 2018, 02:05:47 PM
Reply #27

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
Thanks a lot for all explanations!  :ur:

For the batch, never mind. I'm pretty sure that I be faster by doing the operations in hands. (my skills about that kind of stuff is not that great you know...  0:) )

But I note for sed or awk, I've just realized that I didn't change the metadata like the license (it's proprietary for now) and I have to change that, as many icons are just remakes of the originals and I want to share if someone is interested. So, having a program to change automatically the svg files would be appreciated... (and for the colors, too)

I don't know if you have contacts with the team, but having a "save as" that change automatically a big icons file to individual files, with the right metadata, cleaned of unused defs and so on, could help a lot for sharing icons to the community. And if I make change in some icons that share shapes/elements, it's easier to do the stuff inside a single file. Anyway, thanks a lot for your help!  :2tu:
  • 0.92.2
  • Windows 7

March 04, 2018, 04:56:44 AM
Reply #28

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
Done. Again.  :yay:
The individual icons this time. For the last dev build (for windows) available. Changed few icons, and other will be corrected this week, because some strokes are too thin for my taste. As usual, few icons come from gtk and can't be changed. But new icons are ready. Other icons in \share\icons\hicolor\scalable don't seem to be used yet, I'll only draw them if futures versions will use them.

Again, I attached an example.  :wave:
  • 0.92.2
  • Windows 7

March 05, 2018, 10:45:58 AM
Reply #29

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
You've got one more icon than I do, in the main toolbox.  What is that one on the bottom?

The icon for the Paint Bucket tool - geez.  That's really different!  Oh wait, I think I see.  It is a bucket, but you see more what's coming out of the bucket, and the surface where it's going.  For the widest possible appeal, I'd probably make it more bucket-like in appearance.  Same for the Dropper tool.  It looks a lot like a different kind of pen.

I can't really comment on the smaller ones, because I can't see them well enough.  But the rest of the larger ones look good to me.  No huge problems that I can see.  Nice work!

I didn't follow the discussion about what's happening with 0.93.  Will it offer different themes?  Or are the changes only about icon handling?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 05, 2018, 11:03:02 AM
Reply #30

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
Quote (selected)
You've got one more icon than I do, in the main toolbox.  What is that one on the bottom?
A new tool that will allow to draw lines more accurate when you want to be //, perpendicular to another lines, things like that. That's why I draw a drawing-board-like and something drawn in "draftsman style". Not sure if I'm understandable here...  :???:

Quote (selected)
Will it offer different themes?  Or are the changes only about icon handling?
- I don't think so. But next release is made with gtk 3.0 and the theme is new, obviously.
- Yep, icon handling only.

Quote (selected)
The icon for the Paint Bucket tool - geez.
I have to rework it anyway. Not satisfied with it.

Quote (selected)
Same for the Dropper tool.
That's intended. I used a real dropper, and is a realistic one. But I can understand that it look ugly.

Quote (selected)
Nice work!
:bow1:
  • 0.92.2
  • Windows 7

March 05, 2018, 03:29:57 PM
Reply #31

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
>  but having a "save as" that change automatically a big icons file to individual files, with the right metadata, cleaned of unused defs and so on, could help a lot for sharing icons to the community.

- Yes, that sounds cool. There are extensions that export all objects to single files, one of them is actually pretty advanced. I only remembered it exists now that you talk about 'save as...'.
https://gitlab.com/su-v/inx-exportobjects/tree/master

Can you test what functionality is still missing?

March 06, 2018, 01:01:38 PM
Reply #32

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
>  but having a "save as" that change automatically a big icons file to individual files, with the right metadata, cleaned of unused defs and so on, could help a lot for sharing icons to the community.

- Yes, that sounds cool. There are extensions that export all objects to single files, one of them is actually pretty advanced. I only remembered it exists now that you talk about 'save as...'.
https://gitlab.com/su-v/inx-exportobjects/tree/master

Can you test what functionality is still missing?
Ho, Thanks! I didn't know that this add-on existed. I may try it this week-end but I read the description and many things are messing, if I read well:
- The dimensions of the image is not recalculated for each icon, so problem.
- The defs, that are not saved. It's a problem if I want to share with a gpl license for example. And give my name for my ego.  :-D
- Clean up the file.

Anyway I was thinking about that save_as yesterday and I think that it would be great to create our own "save_as" in a script file. Correct me if I'm wrong, but it seems that the API is scheduled, right? Everyone will need his own save_as for many reasons. So a script like this:

Quote (selected)
script=>save_as;  #other tags: filter, macro, ...
extension=>svg;    #jpg, tar, whatever, the file is automatically saved in the proper format.
Name=>"icon";   #The name displayed.
Options=>{...}; #tricky here...

new List list = getDocument().getLayer("Icons").getGroups(0); #0 is the rank of the groups. So sub groups are not counted in the list.
# we could also have this:
# new List layers = getDocument().getLayers();
# new List elements = layers(0).getObjects();
# new List groups;
# new int j;
# for int i=0 , i < elements.length() , i++
# {if elements[ i ].getType().isGroup() then groups[j++] = elements[ i ];} #my knowledge of Java is old...
new Group group;
new Svg svg;
for i=0, i < list.length(), i++
{
group = list[ i ];
svg = new Svg(group); #basic new svg object, with basic defs and metadatas, basic layer with the group in.
svg.clean_up();
svg.resize(); #no arguments, so it resizes to the size of the group.
svg.setMetadatas(getDocument().getMetadatas()); #I go fast here, but you get the idea.
svg.save_as(group.getID());
}

Easy, isn't it?  >-D
And you could use the same language for macros, filters, plugs-ins...
I know that it's a long task, and maybe impossible, but that would be awesome, really.  :D I know it's just a dream.

Edit: I know that you can already do this, in a sense. But it's not simple, for a basic plug-in you need 2 files or more, some py, some inx... A java-like language that can be done in notepad++, with all stuff in a single file... So good.
  • 0.92.2
  • Windows 7

March 06, 2018, 05:01:06 PM
Reply #33

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Quote (selected)
- The dimensions of the image is not recalculated for each icon, so problem.
- The defs, that are not saved. It's a problem if I want to share with a gpl license for example. And give my name for my ego.  :-D
- Clean up the file.

Well, maybe you should try it out before you complain...

Bildschirmfoto_2018-03-07_01-58-16.png
*Bildschirmfoto_2018-03-07_01-58-16.png
(44.55 kB . 423x671)
(viewed 829 times)

Bildschirmfoto_2018-03-07_01-59-11.png
*Bildschirmfoto_2018-03-07_01-59-11.png
(46.82 kB . 401x664)
(viewed 840 times)


Cleaning up defs for all files can be done with a one-line script on the command line.

Extension files aren't going to change within the next years.

March 06, 2018, 05:02:03 PM
Reply #34

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
There is an option to write your extension in C++, if you want to. But you'd need to compile it, too, then.

March 07, 2018, 11:07:36 AM
Reply #35

Teto

  • Jr. Member

  • Offline
  • ***

  • 29
Quote (selected)
- The dimensions of the image is not recalculated for each icon, so problem.
- The defs, that are not saved. It's a problem if I want to share with a gpl license for example. And give my name for my ego.  :-D
- Clean up the file.

Well, maybe you should try it out before you complain...
Did you read me complaining?
As I wrote, I only watched the description, and didn't try the extension.  :bow1:
There is an option to write your extension in C++, if you want to. But you'd need to compile it, too, then.
And that's the main problem. I'm not a programmer. And many user aren't.
Anyway, you seem to not be pleased about what I wrote here, that's OK. I finished the icons anyway. Too bad that this extension (that could help a lot) wasn't in the official depository (or I missed something), but don't worry, I won't complain anymore.  :)
  • 0.92.2
  • Windows 7

March 07, 2018, 01:31:11 PM
Reply #36

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Did you read me complaining?

I read you were answering Moini's request:

Can you test what functionality is still missing?

Too bad that this extension (that could help a lot) wasn't in the official depository

There really isn't any official repository.  There is a "repository" in the wiki, but it only contains a small fraction of all available extensions.  (When it was first created, it probably had all the extensions at that time.  But wasn't consistently updated over time.)  I have it on my to-do list, to compile a list of all the extensions, with download links (similar to what I did with tutorials)(on the Home tab).  So hopefully pretty soon it will float up to the top.

Meanwhile, there are 3 places you can look, which combined, probably contain  all the known extensions.

 -- http://wiki.inkscape.org/wiki/index.php/Inkscape_Extensions  (it's a working list and is often edited - ulitmately we hope to move most of them to the website/gallery

 -- the website/gallery - https://inkscape.org/en/gallery/=extension/

 -- the wiki repository - http://wiki.inkscape.org/wiki/index.php/ExtensionsRepository
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 07, 2018, 03:42:59 PM
Reply #37

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
The description you read also contains info about the defs, not just my screenshots. It doesn't talk about page resizing, but that doesn't mean that it doesn't do page resizing. Nevermind, though. Sometimes, one just doesn't have time to try things out or to read things thoroughly before one talks about problems (=complains). I understand. It happens. To me, too. Frequently, even. But then I usually don't recoil at a request to try things out, that was phrased in a joking manner (at least, for me). Especially when the person who said that has only been helping me before.