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

Update icons to use UnifiedIcon #991

Merged
merged 14 commits into from
Feb 26, 2024
Merged

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Feb 22, 2024

Resolves #979.

@erri120 erri120 self-assigned this Feb 22, 2024
@erri120 erri120 marked this pull request as ready for review February 22, 2024 13:38
Copy link
Contributor

@Al12rs Al12rs left a comment

Choose a reason for hiding this comment

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

I see that there are still a lot of icons:Icon around, specifically inside buttons.
I think we need those ported over and the button styles updated to use UnifiedIcon instead of icons:Icon

Apart from that I think there might be broken due to the FontSize vs Size thing.
Game Widget had an Icon on the Add Game button that I think was broken even before this PR and needs updating.

@erri120
Copy link
Member Author

erri120 commented Feb 22, 2024

I see that there are still a lot of icons:Icon around, specifically inside buttons. I think we need those ported over and the button styles updated to use UnifiedIcon instead of icons:Icon

I see them now. I was updating the files by searching for the Projektanker namespace, but apparently some files are using xmlns:icons="https://github.com/projektanker/icons.avalonia" instead. I'll fix those.

Apart from that I think there might be broken due to the FontSize vs Size thing. Game Widget had an Icon on the Add Game button that I think was broken even before this PR and needs updating.

A lot of icons didn't have sizes set before, and I didn't want to touch the styling. I changed FontSize to Size and I can fix some sizes.

@Al12rs
Copy link
Contributor

Al12rs commented Feb 22, 2024

A lot of icons didn't have sizes set before, and I didn't want to touch the styling. I changed FontSize to Size and I can fix some sizes.

Hmm, I'm worried we might have issues if we put something that isn't a projektanker icon in the ones that don't have a size and suddenly break the UI with too big or to small icons.
I'm going on the assumption that projektanker icons have a default size while our UnifiedIcon doesn't depending on the underlying type.

@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 58.36%. Comparing base (596d997) to head (bc8e1e5).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #991      +/-   ##
==========================================
+ Coverage   58.18%   58.36%   +0.18%     
==========================================
  Files         637      637              
  Lines       20564    20562       -2     
  Branches     1572     1571       -1     
==========================================
+ Hits        11966    12002      +36     
+ Misses       8240     8201      -39     
- Partials      358      359       +1     
Flag Coverage Δ
Linux 57.56% <66.66%> (+0.15%) ⬆️
Windows 57.56% <66.66%> (+0.18%) ⬆️
clean_environment_tests 58.35% <66.66%> (+0.18%) ⬆️
macOS 56.99% <66.66%> (+0.12%) ⬆️
network_tests ?
networking_tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...exusFluentDark/Styles/Controls/Border/Toolbar.xaml 97.50% <100.00%> (ø)
...sFluentDark/Styles/Controls/Button/PillStyles.xaml 98.91% <100.00%> (-0.03%) ⬇️
...s.App.UI/Controls/GameWidget/GameWidgetStyles.xaml 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@erri120
Copy link
Member Author

erri120 commented Feb 22, 2024

A lot of icons didn't have sizes set before, and I didn't want to touch the styling. I changed FontSize to Size and I can fix some sizes.

Hmm, I'm worried we might have issues if we put something that isn't a projektanker icon in the ones that don't have a size and suddenly break the UI with too big or to small icons. I'm going on the assumption that projektanker icons have a default size while our UnifiedIcon doesn't depending on the underlying type.

We shouldn't rely on implicit default sizes of Projektanker icons anyway.

@erri120 erri120 requested a review from Al12rs February 26, 2024 11:07
@Al12rs Al12rs merged commit e0f85cb into Nexus-Mods:main Feb 26, 2024
5 of 6 checks passed
@erri120 erri120 deleted the issue/979-unified-icon branch February 26, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants