-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Ability to use custom icon styles + dark icon set. #638
Merged
Merged
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
Git Cola Dark Icons | ||
-------------- | ||
All icons in this directory, besides color inversion, | ||
are unmodified original ones. All kudos and copyrights go to their | ||
respective authors ( see original readme bellow ). | ||
|
||
2017 Filip Danilovic | ||
|
||
-------------------- | ||
|
||
Git Cola Icons | ||
-------------- | ||
|
||
The following icons are based on the based on the original .png icon designs | ||
for git-cola's File Browser by Uri Okrent. | ||
|
||
staged.svg | ||
modified.svg | ||
partial.svg | ||
upstream.svg | ||
|
||
Copyright (C) 2011 Uri Okrent | ||
Copyright (C) 2015-2016 David Aguilar and contributors | ||
|
||
License: MIT | ||
|
||
|
||
Git Logo | ||
-------- | ||
Git Logo by Jason Long is licensed under the | ||
Creative Commons Attribution 3.0 Unported License. | ||
http://git-scm.com/downloads/logos | ||
|
||
git-cola.svg is based on the original Git Logo. | ||
|
||
|
||
Octicons | ||
-------- | ||
The following files are from Github's | ||
[octicons](https://github.com/github/octicons) icon set: | ||
|
||
check.svg | ||
circle-slash.svg | ||
desktop-download.svg | ||
diff.svg | ||
ellipsis.svg | ||
eye.svg | ||
file-binary.svg | ||
file-code.svg | ||
file-directory.svg | ||
file-media.svg | ||
file-text.svg | ||
file-zip.svg | ||
fold.svg | ||
gear.svg | ||
git-branch.svg | ||
git-compare.svg | ||
git-merge.svg | ||
link-external.svg | ||
pencil.svg | ||
plus.svg | ||
primitive-dot.svg | ||
question.svg | ||
question-plain.svg | ||
repo-pull.svg | ||
repo-push.svg | ||
repo.svg | ||
screen-full.svg | ||
search.svg | ||
star.svg | ||
sync.svg | ||
tag.svg | ||
telescope.svg | ||
trashcan.svg | ||
unfold.svg | ||
x.svg | ||
|
||
Copyright (C) 2012-2015 GitHub | ||
License: [MIT](http://choosealicense.com/licenses/mit/) | ||
|
||
|
||
Gnome High Contrast Icons | ||
------------------------- | ||
The following files are from the Gnome High Contrast Icon set: | ||
|
||
zoom-fit-best.svg | ||
zoom-in.svg | ||
zoom-out.svg | ||
|
||
License: LGPL v2+ | ||
|
||
|
||
Flaticon.com Icons | ||
------------------ | ||
|
||
The following files are designed by Freepik from http://www.flaticons.com/ | ||
|
||
edit-undo.svg | ||
|
||
License: [Flatpik Basic License](http://cdn.flaticon.com/license/license.pdf) | ||
|
||
|
||
The following files are by Linh Pham from http://flaticons.com/ | ||
|
||
edit-copy.svg | ||
|
||
License: [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/) | ||
|
||
|
||
Google Icons | ||
------------ | ||
|
||
The following files are by Google: | ||
|
||
edit-select-all.svg | ||
file-download.svg | ||
|
||
License: [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny tweak: for keyword arguments, prefer doing
icon_dir(style=style)
at the callsite.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Will do, thanks for the correction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is really the main change that I keep coming back to as a slightly unfortunate change in the relative dependencies. Previously the
icons
module was more pure, and didn't import anything, and we didn't have to call into git so early (during module import) so that we can defer a few things.Sorry it's taken so long to get back to this one, but it's become a little clearer with time. Would it be okay if we made this something that's controlled via the environment instead?
There's already precedent for a few of these in the
ENVIRONMENT VARIABLES
section ofdocs/git-cola.rst
, namelyGIT_COLA_SCALE
which is directly related to the UI. The reason these are done via the environment is that they affect the critical startup code paths that we've tried to keep as minimal as possible.Would it be okay if we changed the style to be a lookup of
os.environ.get('GIT_COLA_ICON_THEME', 'light')
? Presumably we can then make thestyle
optional argument into a required argument, and special-case it inside oficon_dir()
instead.I may merge this soon with these changes applied locally, which hopefully won't be too much of a hassle to upgrade to.
Example
.bashrc
/.xsessionrc
:GIT_COLA_ICON_THEME=dark export GIT_COLA_ICON_THEME
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just following up -- not sure if you noticed but I ended up keeping the config-driven approach, and ended up augmenting it with
--icon-theme=<theme>
as well as allowingGIT_COLA_ICON_THEME
in the environment. The only other minor difference is that the config variable is namedcola.icontheme
whereas it was originallycola.iconstyle
.