Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Fix app icon in light mode #38

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Fix app icon in light mode #38

merged 1 commit into from
Nov 22, 2023

Conversation

julien-nc
Copy link
Member

In the app list and in the admin setting section.

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@@ -43,7 +43,7 @@ public function getName(): string {
* @return string
*/
public function getIcon(): string {
return $this->urlgen->imagePath(Application::APP_ID, 'app.svg');
Copy link
Member

Choose a reason for hiding this comment

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

Does this actually change anything? Is -dark some kind of magic string?

Copy link
Member Author

Choose a reason for hiding this comment

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

The magic happens with the "fill" attribute on the <svg> tag. I always keep a dark and a light version just in case. You can get rid if the light one if you want.

Copy link
Member

Choose a reason for hiding this comment

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

So, what does this fix? getIcon() used to return app.svg which was dark. Now it returns app-dark.svg which is dark.

Copy link
Member Author

Choose a reason for hiding this comment

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

app.svg is used in the app list (app settings)
app-dark.svg must be used as the admin settings section icon.

Check those 2 places with dark and light theme and you'll see the icon color was wrong before and is ok now 😁 .

Copy link
Member

Choose a reason for hiding this comment

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

Oof, magic file names... Thanks for this, then 💙

@marcelklehr marcelklehr merged commit fbb98ac into main Nov 22, 2023
13 of 15 checks passed
@marcelklehr marcelklehr deleted the fix/dark-app-icon branch November 22, 2023 08:06
Copy link

github-actions bot commented Dec 6, 2023

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants