Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ability to use custom icon styles + dark icon set. #638
This being my first time playing with Cola source likelly means that there are better ways to do this.
In detail, custom icons:
Tested and working on:
Awesome, this is pretty cool. I'm currently in the middle of switching ISPs so I have spotty internet access until next week, but I'll try to take a look soon so that we can move forward with this topic.
I like several aspects of this idea:
I like the idea of allowing
I have an idea that we could also use to generalize
Thanks. No problem & no rush.
It would indeed. I guess I was leaning towards "style" because of "light" vs. "dark". Seemed more fitting...
There's one issue with custom icons, and that is if you specify an existing directory which has only a partial set, or no icons at all, Cola will start, but there will be missing icons ( or none at all ).
Jan 18, 2017
1 check passed
Regarding having a directory with a partial set of icons -- I think we can fix that by allowing
git config --add cola.icontheme /path/to/custom/icons git config --add cola.icontheme dark
... and then in cola we just need to call
I'll try implementing that shortly.
added a commit
this pull request
Jan 19, 2017
Awesome job, esp. on the addition of the cmd line parameter. Thank you very much for accepting and much improving this!
Now, while this is perfectly fine as-is ( IMO atleast ), I'd like to mention/talk about one tidbit I left out originally to keep PR on topic:
AFAIK, raster images render faster and ( when downsized ) are certanly going to end up much smaller in file size, thus reducing start-up time, however small and negligible the impact may be ( atleast on modern machines with SSD's )...?
In short, is there a reason not to downsize the default icons to, say 32-48px ( which should also cover for HiDPI ), and convert them to png?
Oh, there's not a reason for them to be as large as they are, that's just what's specified at the top of the file. A lot of the icons came from github's "octicons" icon set. What I really like about them is how tiny they are -- many of them are only ~300 bytes.
svg is nice because it's resolution-independent. On Linux, at least, the icons are reasonably sized since Qt just scales it down to the size of the button. If we could just edit the svg text and size them down that would be okay, as long as the embedded paths are still valid.
Are you seeing cases where the icons are too large when rendered by the app? I'd be interested in fixing those. We did have an open issue about the icons getting larger on OS X after switching to svg icons, and in that issue #550 there's additional notes about some things that were tried.
I would like to avoid pngs. We had png icons in the past and they were ugly, but maybe there's something we can do app-side. What kinda issues are you sseing?
My main test machines these days are a HiDPI linux laptop and a non-hidpi linux desktop, so I appreciate help from other angles.
No, actually I haven't run into any issues per se, I'm just curious as to your thoughts, for the (primary) reason I'll get to later, and 'cause the size seems to be a bit unnecessarily large, which makes me think it makes Cola slower to start, due to resizing overhead and vector vs. raster, though it's nothing I've tested extensively/have any hard data on.
But, I've had some issues with Inkscape color inversion preparing this PR, which made all svg's unrenderable by Cola/QT, so before finding/fixing the cause I converted them to XX*48 png's, ran a
Nope, I beleive that paths need to be changed as well ( not 100% sure, but AFAIK, it's either still gonna render at original size, or not at all ).
And the other reason for asking about png vs svg I've mentioned, is that I've had this idea to make a set for Cola based on Faenza action icons, however I suck at vector graphics ( raster as well, though not as badly ).
def merge(): return icon('git-merge') # Returns either png or svg
So you can just drop a correctly named icons into "icons" dir, and have it JustWork™, regardless of image format.