Merge pull request #672 from jpcima/filled-style-icons

Filled style icons
This commit is contained in:
JP Cimalando 2021-02-27 13:42:56 +01:00 committed by GitHub
commit 9ad1e7faa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 23 deletions

View file

@ -5,8 +5,10 @@ set(EDITOR_RESOURCES
logo.png
logo_text.png
logo_text_white.png
logo_text_shaded.png
logo_text@2x.png
logo_text_white@2x.png
logo_text_shaded@2x.png
background.png
background@2x.png
icon_white.png
@ -14,6 +16,7 @@ set(EDITOR_RESOURCES
knob48.png
knob48@2x.png
Fonts/sfizz-fluentui-system-r20.ttf
Fonts/sfizz-fluentui-system-f20.ttf
Fonts/Roboto-Regular.ttf
PARENT_SCOPE)

View file

@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -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"));
@ -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 };
@ -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);
@ -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));
@ -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) {
@ -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));
@ -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));

View file

@ -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);

View file

@ -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"

View file

@ -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