Skip to content
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

Simplify icons structure #160

Merged
merged 6 commits into from
Sep 30, 2023
Merged

Conversation

tfuxu
Copy link
Contributor

@tfuxu tfuxu commented Sep 27, 2023

This PR simplifies the way icons can be added to gtkcord4. It also removes all PNG icons and changes some of the icons to GNOME alternatives.

- move logo and logo-nightly to `icons/hicolor/scalable/apps`
- add `gtkcord4.gresource.xml` and generated `gtkcord4.gresource`
- remove `icons.gresource`
- remove `pack-icons` module
- remove `svg2png` script
- refactor `icons` module to only have `LoadResources` function
- initialize resources in `main.go`
- regenerate `gtkcord4.gresource`
- add tooltips to `v.sendButton` and `b.menu`
- change icon for `v.sendButton` to `paper-plane-symbolic`
- change icon for `b.FolderIcon` to `folder-visiting-symbolic`
- change default icon for `BackButton` to `sidebar-show-symbolic`
Copy link
Owner

@diamondburned diamondburned left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting PR! Is there a way for me to not have to touch the XML file for future icon additions? I also added a minor change.

internal/icons/icons.go Show resolved Hide resolved
@tfuxu
Copy link
Contributor Author

tfuxu commented Sep 29, 2023

This is an interesting PR! Is there a way for me to not have to touch the XML file for future icon additions? I also added a minor change.

I could probably make a script for this, but adding a new icon to GResource is just a matter of adding one extra line, like this one:

<file preprocess="xml-stripblanks" alias="avatar-default-symbolic.svg">scalable/actions/avatar-default-symbolic.svg</file>

@diamondburned diamondburned merged commit 9e0f770 into diamondburned:main Sep 30, 2023
6 of 8 checks passed
@tfuxu tfuxu deleted the local-icons branch September 30, 2023 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants