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

FIX: Source Navigator Icon Symbols affected by accent color #1589

Merged

Conversation

activcoding
Copy link
Member

Description

Before, we were using .accentColor to set the color of file icons in the source navigator. However, this wasn't the intended behavior, so I've updated it to use .foregroundStyle on the icons instead.

Related Issues

na

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Before:
Screenshot_2024-02-06_alle_15
Screenshot_2024-02-06_alle_16 15 37

Now:
Screenshot_2024-02-06_alle_16 11 31

@austincondiff
Copy link
Collaborator

austincondiff commented Feb 6, 2024

I see, if the user has a specific color selected as their accent color, it overrides our custom colors. But if you have the default selected it displays normally.

@Angelk90 this is why I wasn’t seeing this issue.

@activcoding
Copy link
Member Author

@austincondiff In SourceControlNavigatorRepositoryItem.swift if found this code. Was this if clause intentional, or am I overlooking something?

if item.symbolImage != nil {
    Image(symbol: item.symbolImage ?? "")
        .opacity(controlActiveState == .inactive ? 0.5 : 1)
         .foregroundStyle(item.imageColor ?? .accentColor)
} else {
    Image(symbol: item.symbolImage ?? "")
       .opacity(controlActiveState == .inactive ? 0.5 : 1)
       .foregroundStyle(item.imageColor ?? .accentColor)
}

@matthijseikelenboom matthijseikelenboom merged commit 6509eed into CodeEditApp:main Feb 6, 2024
2 checks passed
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.

None yet

5 participants