-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Use system theme icons #458
Use system theme icons #458
Conversation
This allows the use of the system theme icon for undo, which by FreeDesktop standards is named edit-undo
Prefer system icons when getting icons, falling back to the provided icons only when the icon doesn't exist
Would you make a screenshot of Git Cola using system theme icons? I wonder what It'll look like after the patch? |
Here are a couple of screenshots. Some of it is hard to take screenshots for, because they're in the menus. And a lot of the icons already use Qt to get the right icons in the first place, so, by and large, it already fit in reasonably well. It's just that it becomes very obvious when it doesn't, because Breeze is visually very different from Oxygen, which the original icons did a decent job of fitting well in. Not all icons are changed though, some because they have no facsimile in the system, others because I'm unsure about them. The changed icons mostly lie in the menus and buttons, because those, I find, should be more integrated into the system look. |
|
||
|
||
def options_icon(): | ||
"""Return a standard open directory icon""" | ||
return icon('options.svg') | ||
return QtGui.QIcon.fromTheme("configure", icon('options.svg')) |
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.
Sorry for the style nit, but can you please use single-quotes here so that it's consistent with the rest of the line?
In a follow-up commit, I might be tempted into refactoring theme_icon() to allow for this kind of invocation by allowing for an optional 2nd argument. That way these calls can all use theme_icon(). Don't worry about that now, though, this'll be fine once the quote thing is fixed-up.
Merged, thanks. I made some small tweaks to accommodate older versions of Qt in aaa3543 as a follow-up. |
With KDE's new Plasma 5 Workspace, some of the icons are looking very much out of place with the new Breeze icon theme. So I've basically made git-cola take icons from the system whenever possible, instead of using its own. It does still fallback on its own icons if it can't find a system icon with the provided name.
This should help it blend better into Plasma 5's looks, with the nice side effect of probably also blending in better with other desktop environments as well.
Signed-off-by: Benedict Lee benedictleejh@gmail.com