Skip to content

Commit

Permalink
Add a couple of glyphs from flowbite (#134)
Browse files Browse the repository at this point in the history
an MIT licensed SVG vector set
  • Loading branch information
baconpaul authored Nov 25, 2024
1 parent b6190df commit 55af8e4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ cmrc_add_resource_library(sst-jucegui-resources NAMESPACE sst::jucegui::resource
res/glyphs/ellipsis-v.svg
res/glyphs/favorite.svg
res/glyphs/forward-backward.svg
res/glyphs/folder.svg
res/glyphs/file-music.svg
res/glyphs/freeze.svg
res/glyphs/left-right.svg
res/glyphs/left.svg
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ AND THEN
- Squash it, Ship it, hack SC

https://www.figma.com/file/Acyp9F2ymRC2K8ltF3liaT/ED-Surge-XT-Wireframes-2.0.3?node-id=2299%3A45726

Several of the icons in res/glyphs are from the MIT flowbrite icon collection
https://github.com/themesberg/flowbite-icons

4 changes: 4 additions & 0 deletions include/sst/jucegui/components/GlyphPainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ struct GlyphPainter : public juce::Component,
ROUTING_PRE_FADER,
ROUTING_POST_FADER,

// FileSystem
FOLDER,
FILE_MUSIC,

FAVORITE,
SAVE,
SEARCH,
Expand Down
4 changes: 4 additions & 0 deletions res/glyphs/file-music.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 res/glyphs/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/sst/jucegui/components/GlyphPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void paintFromSvg(juce::Graphics &g, const juce::Rectangle<int> &into, const std
}
catch (std::exception &e)
{
g.setColour(juce::Colours::red);
g.fillRect(into);
// oh well
}
}
Expand All @@ -127,7 +129,8 @@ void paintFromSvg(juce::Graphics &g, const juce::Rectangle<int> &into, const std
}
else
{
g.fillAll(juce::Colours::orchid);
g.setColour(juce::Colours::orchid);
g.fillRect(into);
}
}
}
Expand Down Expand Up @@ -238,6 +241,9 @@ void GlyphPainter::paintGlyph(juce::Graphics &g, const juce::Rectangle<int> &int
SVG24(NOTE_PRIORITY, "note-priority");
SVG24(ARROW_L_TO_R, "arrow-ltor");

SVG24(FOLDER, "folder");
SVG24(FILE_MUSIC, "file-music");

case SHOW_INFO:
paintFromSvg(g, into, "res/glyphs/show-info.svg", 0xFFAFAFAF, 16, 16, as);
return;
Expand Down

0 comments on commit 55af8e4

Please sign in to comment.