Skip to content

Commit

Permalink
Add a mute icon to the glyphs (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul authored May 31, 2024
1 parent db37032 commit e5d97c4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ include(cmake/CmakeRC.cmake)
cmrc_add_resource_library(sst-jucegui-resources NAMESPACE sst::jucegui::resources
res/glyphs/step_count.svg
res/glyphs/metronome.svg
res/glyphs/mute.svg
)

add_library(${PROJECT_NAME} STATIC
Expand Down
2 changes: 2 additions & 0 deletions include/sst/jucegui/components/GlyphPainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ struct GlyphPainter : public juce::Component,
STEP_COUNT,
POWER_LIGHT,

MUTE,

MONO,
STEREO // the order doesn't matter but we iterate in the demo so
// lets leave stereo last
Expand Down
12 changes: 12 additions & 0 deletions res/glyphs/mute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/sst/jucegui/components/GlyphPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ void GlyphPainter::paintGlyph(juce::Graphics &g, const juce::Rectangle<int> &int
paintFromSvg(g, into, "res/glyphs/metronome.svg", 0xFFAFAFAF, 24, 24, as);
return;

case MUTE:
paintFromSvg(g, into, "res/glyphs/mute.svg", 0xFFAFAFAF, 1400, 1400, as);
return;

case KEYBOARD:
paintKeyboardGlyph(g, into);
return;
Expand Down

0 comments on commit e5d97c4

Please sign in to comment.