Skip to content

Commit

Permalink
Add heart, chip and save-as glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Aug 1, 2024
1 parent 3e5c20f commit ab20f77
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ cmrc_add_resource_library(sst-jucegui-resources NAMESPACE sst::jucegui::resource
res/glyphs/routing-post-fader.svg
res/glyphs/routing-pre-fader.svg
res/glyphs/routing-pre-fx.svg
res/glyphs/heart.svg
res/glyphs/chip.svg
res/glyphs/save-as.svg
)

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

MUTE,
HEART,
CHIP,
SAVE_AS,

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

case CHIP:
paintFromSvg(g, into, "res/glyphs/chip.svg", 0xFFAFAFAF, 24, 24, as);
return;

case HEART:
paintFromSvg(g, into, "res/glyphs/heart.svg", 0xFFAFAFAF, 24, 24, as);
return;

case SAVE_AS:
paintFromSvg(g, into, "res/glyphs/save-as.svg", 0xFFAFAFAF, 24, 24, as);
return;

case ROUTING_PRE_FX:
paintFromSvg(g, into, "res/glyphs/routing-pre-fx.svg", 0xFFAFAFAF, 24, 24, as);
return;
Expand Down

0 comments on commit ab20f77

Please sign in to comment.