-
Notifications
You must be signed in to change notification settings - Fork 270
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
treebrowser: fix icons in the tree and the toolbar #927
Open
techee
wants to merge
6
commits into
geany:master
Choose a base branch
from
techee:treebrowser
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
lpaulsen93
requested changes
Oct 13, 2019
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.
Apart from the two little remarks, it looks good to me.
The big advantage is that the code is identical for both GTK2 and GTK3 so we avoid many ifdefs. In addition, this allows us to use more icons on GTK2 and not to be limited to the stock ones.
For expanded directory we should use the "folder-open" icon and not "document-open" which is an action icon used for e.g. a toolbar icon to open a document and can be themed in a completely different way. Similarly, the "folder" icon used in the toolbar is a document-type icon and here we should use some action icon. I used the "edit-copy" icon which typically looks like two documents next to each other which kind of corresponds to this action. But it's possible there's some better option here.
ui_image_menu_item_new() only works with stock items and not freedesktop icon names. This means that on GTK3, no icons were displayed this way. We can implement our own version of ui_image_menu_item_new() which uses gtk_image_new_from_icon_name() which is present in both GTK2 and GTK3 and use this one instead.
There's no need for this as gtk_image_new_from_icon_name() works on GTK2 too.
I've added a few more commits because icons weren't shown in the popup menu on GTK3 - see the new commits for more info. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed several problems with the tree browser:
2. Expanded folder icon is wrong and corresponds to document open action icon instead of a file type icon
3. On MacOS folder icons are themed differently than e.g. ProjectOrganizer or File browser plugins.
This pull request addresses these issues and makes some cleanups of the code in addition.