Skip to content

Commit

Permalink
Merge pull request #672 from jpcima/filled-style-icons
Browse files Browse the repository at this point in the history
Filled style icons
  • Loading branch information
jpcima authored Feb 27, 2021
2 parents c88e551 + 5fe2be5 commit 9ad1e7f
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 23 deletions.
3 changes: 3 additions & 0 deletions plugins/editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ set(EDITOR_RESOURCES
logo.png
logo_text.png
logo_text_white.png
logo_text_shaded.png
[email protected]
[email protected]
[email protected]
background.png
[email protected]
icon_white.png
[email protected]
knob48.png
[email protected]
Fonts/sfizz-fluentui-system-r20.ttf
Fonts/sfizz-fluentui-system-f20.ttf
Fonts/Roboto-Regular.ttf
PARENT_SCOPE)

Expand Down
16 changes: 8 additions & 8 deletions plugins/editor/layout/main.fl
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ widget_class mainView {open
class RoundedGroup
} {
Fl_Box {} {
comment {tag=kTagFirstChangePanel+kPanelGeneral}
image {../resources/logo_text_white.png} xywh {35 9 120 60}
comment {tag=kTagFirstChangePanel+kPanelGeneral} selected
image {../resources/logo_text_shaded.png} xywh {35 9 120 60}
class SfizzMainButton
}
Fl_Button {} {
comment {tag=kTagFirstChangePanel+kPanelGeneral} selected
xywh {49 77 25 25} labelsize 24
comment {tag=kTagFirstChangePanel+kPanelGeneral}
xywh {36 73 32 32} labelsize 30
class HomeButton
}
Fl_Button {} {
comment {tag=kTagFirstChangePanel+kPanelControls} selected
xywh {81 77 25 25} labelsize 24
comment {tag=kTagFirstChangePanel+kPanelControls}
xywh {76 73 32 32} labelsize 30
class CCButton
}
Fl_Button {} {
comment {tag=kTagFirstChangePanel+kPanelSettings} selected
xywh {112 77 25 25} labelsize 24
comment {tag=kTagFirstChangePanel+kPanelSettings}
xywh {116 73 32 32} labelsize 30
class SettingsButton
}
}
Expand Down
Binary file not shown.
Binary file added plugins/editor/resources/logo_text_shaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/editor/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions plugins/editor/src/editor/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ void Editor::Impl::createFrameContents()
{
CViewContainer* mainView;

SharedPointer<CBitmap> iconWhite = owned(new CBitmap("logo_text_white.png"));
SharedPointer<CBitmap> iconShaded = owned(new CBitmap("logo_text_shaded.png"));
SharedPointer<CBitmap> background = owned(new CBitmap("background.png"));
SharedPointer<CBitmap> knob48 = owned(new CBitmap("knob48.png"));
SharedPointer<CBitmap> logoText = owned(new CBitmap("logo_text.png"));
Expand Down Expand Up @@ -603,7 +603,7 @@ void Editor::Impl::createFrameContents()
darkTheme.highlightedText = { 0xfd, 0x98, 0x00 };
darkTheme.titleBoxText = { 0x00, 0x00, 0x00 };
darkTheme.titleBoxBackground = { 0xba, 0xbd, 0xb6 };
darkTheme.icon = darkTheme.text;
darkTheme.icon = { 0xb2, 0xb2, 0xb2 };
darkTheme.iconHighlight = { 0xfd, 0x98, 0x00 };
darkTheme.valueText = { 0x00, 0x00, 0x00 };
darkTheme.valueBackground = { 0x9a, 0x9a, 0x9a };
Expand Down Expand Up @@ -636,8 +636,8 @@ void Editor::Impl::createFrameContents()
box->setTitleFont(font);
return box;
};
auto createSfizzMainButton = [this, &iconWhite](const CRect& bounds, int tag, const char*, CHoriTxtAlign, int) {
return new CKickButton(bounds, this, tag, iconWhite);
auto createSfizzMainButton = [this, &iconShaded](const CRect& bounds, int tag, const char*, CHoriTxtAlign, int) {
return new CKickButton(bounds, this, tag, iconShaded);
};
auto createLabel = [&theme](const CRect& bounds, int, const char* label, CHoriTxtAlign align, int fontsize) {
CTextLabel* lbl = new CTextLabel(bounds, label);
Expand Down Expand Up @@ -757,7 +757,7 @@ void Editor::Impl::createFrameContents()
};
auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) {
STextButton* btn = new STextButton(bounds, this, tag, glyph);
btn->setFont(makeOwned<CFontDesc>("Sfizz Fluent System R20", fontsize));
btn->setFont(makeOwned<CFontDesc>("Sfizz Fluent System F20", fontsize));
btn->setTextColor(theme->icon);
btn->setHoverColor(theme->iconHighlight);
btn->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00));
Expand Down Expand Up @@ -792,7 +792,7 @@ void Editor::Impl::createFrameContents()
};
auto createResetSomethingButton = [&createValueButton](const CRect& bounds, int tag, const char*, CHoriTxtAlign, int fontsize) {
STextButton* btn = createValueButton(bounds, tag, u8"\ue13a", kCenterText, fontsize);
btn->setFont(makeOwned<CFontDesc>("Sfizz Fluent System R20", fontsize));
btn->setFont(makeOwned<CFontDesc>("Sfizz Fluent System F20", fontsize));
return btn;
};
auto createPiano = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int fontsize) {
Expand All @@ -804,7 +804,7 @@ void Editor::Impl::createFrameContents()
auto createChevronDropDown = [this, &theme](const CRect& bounds, int, const char*, CHoriTxtAlign, int fontsize) {
SActionMenu* menu = new SActionMenu(bounds, this);
menu->setTitle(u8"\ue0d7");
menu->setFont(makeOwned<CFontDesc>("Sfizz Fluent System R20", fontsize));
menu->setFont(makeOwned<CFontDesc>("Sfizz Fluent System F20", fontsize));
menu->setFontColor(theme->icon);
menu->setHoverColor(theme->iconHighlight);
menu->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00));
Expand All @@ -817,7 +817,7 @@ void Editor::Impl::createFrameContents()
result = u8"\ue0d7";
return true;
});
menu->setFont(makeOwned<CFontDesc>("Sfizz Fluent System R20", fontsize));
menu->setFont(makeOwned<CFontDesc>("Sfizz Fluent System F20", fontsize));
menu->setFontColor(theme->icon);
menu->setHoverColor(theme->iconHighlight);
menu->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00));
Expand Down
6 changes: 3 additions & 3 deletions plugins/editor/src/editor/layout/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ auto* const view__3 = createRoundedGroup(CRect(5, 4, 180, 105), -1, "", kCenterT
view__2->addView(view__3);
auto* const view__4 = createSfizzMainButton(CRect(30, 5, 150, 65), kTagFirstChangePanel+kPanelGeneral, "", kCenterText, 14);
view__3->addView(view__4);
auto* const view__5 = createHomeButton(CRect(44, 73, 69, 98), kTagFirstChangePanel+kPanelGeneral, "", kCenterText, 24);
auto* const view__5 = createHomeButton(CRect(31, 69, 63, 101), kTagFirstChangePanel+kPanelGeneral, "", kCenterText, 30);
view__3->addView(view__5);
auto* const view__6 = createCCButton(CRect(76, 73, 101, 98), kTagFirstChangePanel+kPanelControls, "", kCenterText, 24);
auto* const view__6 = createCCButton(CRect(71, 69, 103, 101), kTagFirstChangePanel+kPanelControls, "", kCenterText, 30);
view__3->addView(view__6);
auto* const view__7 = createSettingsButton(CRect(107, 73, 132, 98), kTagFirstChangePanel+kPanelSettings, "", kCenterText, 24);
auto* const view__7 = createSettingsButton(CRect(111, 69, 143, 101), kTagFirstChangePanel+kPanelSettings, "", kCenterText, 30);
view__3->addView(view__7);
auto* const view__8 = createRoundedGroup(CRect(185, 5, 565, 105), -1, "", kCenterText, 14);
view__2->addView(view__8);
Expand Down
10 changes: 6 additions & 4 deletions scripts/generate_ui_fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ if ! test -d "src"; then
fi

root="`pwd`"
fonts="$root/editor/resources/Fonts"
fonts="$root/plugins/editor/resources/Fonts"

if test ! -d editor/external/fluentui-system-icons; then
cd editor/external
if test ! -d plugins/editor/external/fluentui-system-icons; then
cd plugins/editor/external
git clone https://github.com/sfztools/fluentui-system-icons.git
cd fluentui-system-icons
else
cd editor/external/fluentui-system-icons
cd plugins/editor/external/fluentui-system-icons
git checkout master
git pull origin master
fi

./generate_icons_font.py -s regular -w 20 -n 'Sfizz Fluent System R20' \
-o "$fonts/sfizz-fluentui-system-r20.ttf"
./generate_icons_font.py -s filled -w 20 -n 'Sfizz Fluent System F20' \
-o "$fonts/sfizz-fluentui-system-f20.ttf"
1 change: 1 addition & 0 deletions scripts/innosetup.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Source: "sfizz.vst3\Plugin.ico"; Components: vst3; DestDir: "{commoncf}\VST3\sfi
Source: "sfizz.vst3\gpl-3.0.txt"; Components: main; DestDir: "{app}"
; Note(sfizz): OS older than Windows 10 require UI fonts to be installed system-wide
Source: "sfizz.vst3\Contents\Resources\Fonts\sfizz-fluentui-system-r20.ttf"; DestDir: "{fonts}"; FontInstall: "Sfizz Fluent System R20"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4
Source: "sfizz.vst3\Contents\Resources\Fonts\sfizz-fluentui-system-f20.ttf"; DestDir: "{fonts}"; FontInstall: "Sfizz Fluent System F20"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4
Source: "sfizz.vst3\Contents\Resources\Fonts\Roboto-Regular.ttf"; DestDir: "{fonts}"; FontInstall: "Roboto Regular"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4
;Source: "setup\vc_redist.x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Expand Down

0 comments on commit 9ad1e7f

Please sign in to comment.