Skip to content

Conversation

@drammock
Copy link
Member

closes #11320

@drammock drammock added the backport-candidate on-merge: backport to maint/1.11 label Nov 15, 2022
font_class = ('fa-brands' if icon in brand_icons else 'fa-solid',)
icons[icon] = font_class + ('fa-fw',) if icon in fixed_width_icons else ()
icon_class[icon] = ('fa-brands',) if icon in brand_icons else ('fa-solid',)
icon_class[icon] += ('fa-fw',) if icon in fixed_width_icons else ()
Copy link
Member Author

Choose a reason for hiding this comment

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

this line was the crucial change. there was a scope problem for the if/else, such that non-fixed-width icons were ending up with no classes.

Comment on lines +1015 to +1023
'book', 'code-branch', 'newspaper', 'circle-question', 'quote-left',
# contrib guide:
'bug', 'comment', 'hand-sparkles', 'magic', 'pencil-alt', 'remove-format',
'universal-access', 'discourse', 'python',
'bug-slash', 'comment', 'computer-mouse', 'hand-sparkles', 'pencil',
'text-slash', 'universal-access', 'wand-magic-sparkles',
'discourse', 'python',
)
other_icons = (
'hand-paper', 'question', 'rocket', 'server', 'code', 'desktop',
'terminal', 'cloud-download-alt', 'wrench', 'hourglass'
'terminal', 'cloud-arrow-down', 'wrench', 'hourglass-half'
Copy link
Member Author

@drammock drammock Nov 16, 2022

Choose a reason for hiding this comment

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

name changes here reflect changes between FontAwesome 5 and 6. This should hopefully make things more future-proof, as I think support for the old names goes away with FA7.

@larsoner larsoner merged commit 0fbd8fc into mne-tools:main Nov 16, 2022
larsoner pushed a commit that referenced this pull request Nov 16, 2022
@larsoner
Copy link
Member

Merged and backported, thanks @drammock

@larsoner larsoner added backported and removed backport-candidate on-merge: backport to maint/1.11 labels Nov 16, 2022
@drammock drammock deleted the fix-icons branch November 16, 2022 14:47
larsoner added a commit to ruuskas/mne-python that referenced this pull request Nov 17, 2022
* upstream/main:
  fix epochs.plot_image for EMG data (mne-tools#11322)
  fix fontawesome icon display (mne-tools#11328)
  [DOC, MRG] fix/improve documentation of n_jobs for apply_function (mne-tools#11325)
  [MAINT, MRG] fix is_mesa (mne-tools#11313)
  BUG: Fix bug with parallel progress bars (mne-tools#11311)
  BUG: Fix bug with report replacement (mne-tools#11318)
  MAINT: Fix docs (mne-tools#11317)
  Fix typo in changelog (mne-tools#11315)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fontawesome icons not displaying correctly

2 participants