diff --git a/editor/cmake/Vstgui.cmake b/editor/cmake/Vstgui.cmake index 0ad30b36..e2d7143d 100644 --- a/editor/cmake/Vstgui.cmake +++ b/editor/cmake/Vstgui.cmake @@ -194,11 +194,11 @@ else() endif() if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - target_compile_definitions(sfizz-vstgui PRIVATE "DEVELOPMENT") + target_compile_definitions(sfizz-vstgui PUBLIC "DEVELOPMENT") endif() if(${CMAKE_BUILD_TYPE} MATCHES "Release") - target_compile_definitions(sfizz-vstgui PRIVATE "RELEASE") + target_compile_definitions(sfizz-vstgui PUBLIC "RELEASE") endif() if(CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/editor/src/editor/Editor.cpp b/editor/src/editor/Editor.cpp index dc4870b2..b4a4608e 100644 --- a/editor/src/editor/Editor.cpp +++ b/editor/src/editor/Editor.cpp @@ -423,7 +423,7 @@ void Editor::Impl::createFrameContents() box->setBackgroundColor(theme->boxBackground); box->setTitleFontColor(theme->titleBoxText); box->setTitleBackgroundColor(theme->titleBoxBackground); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); box->setTitleFont(font); return box; }; @@ -436,7 +436,7 @@ void Editor::Impl::createFrameContents() lbl->setBackColor(CColor(0x00, 0x00, 0x00, 0x00)); lbl->setFontColor(theme->text); lbl->setHoriAlign(align); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); lbl->setFont(font); return lbl; }; @@ -463,7 +463,7 @@ void Editor::Impl::createFrameContents() lbl->setBackColor(CColor(0x00, 0x00, 0x00, 0x00)); lbl->setFontColor(theme->text); lbl->setHoriAlign(align); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); lbl->setFont(font); return lbl; }; @@ -476,7 +476,7 @@ void Editor::Impl::createFrameContents() #if 0 auto createButton = [this](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) { CTextButton* button = new CTextButton(bounds, this, tag, label); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); button->setFont(font); button->setTextAlignment(align); return button; @@ -484,7 +484,7 @@ void Editor::Impl::createFrameContents() #endif auto createClickableLabel = [this, &theme](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) { STextButton* button = new STextButton(bounds, this, tag, label); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); button->setFont(font); button->setTextAlignment(align); button->setTextColor(theme->text); @@ -499,7 +499,7 @@ void Editor::Impl::createFrameContents() }; auto createValueButton = [this, &theme](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) { STextButton* button = new STextButton(bounds, this, tag, label); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); button->setFont(font); button->setTextAlignment(align); button->setTextColor(theme->valueText); @@ -515,7 +515,7 @@ void Editor::Impl::createFrameContents() auto createValueMenu = [this, &theme](const CRect& bounds, int tag, const char*, CHoriTxtAlign align, int fontsize) { SValueMenu* vm = new SValueMenu(bounds, this, tag); vm->setHoriAlign(align); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); vm->setFont(font); vm->setFontColor(theme->valueText); vm->setBackColor(theme->valueBackground); @@ -526,7 +526,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(new CFontDesc("Sfizz Fluent System R20", fontsize)); + btn->setFont(makeOwned("Sfizz Fluent System R20", fontsize)); btn->setTextColor(theme->icon); btn->setHoverColor(theme->iconHighlight); btn->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00)); @@ -559,14 +559,14 @@ void Editor::Impl::createFrameContents() }; auto createPiano = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int fontsize) { SPiano* piano = new SPiano(bounds); - auto font = owned(new CFontDesc("Roboto", fontsize)); + auto font = makeOwned("Roboto", fontsize); piano->setFont(font); return piano; }; 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(new CFontDesc("Sfizz Fluent System R20", fontsize)); + menu->setFont(makeOwned("Sfizz Fluent System R20", fontsize)); menu->setFontColor(theme->icon); menu->setHoverColor(theme->iconHighlight); menu->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00)); diff --git a/editor/src/editor/GUIPiano.cpp b/editor/src/editor/GUIPiano.cpp index dd7d6cf5..2c17ddc4 100644 --- a/editor/src/editor/GUIPiano.cpp +++ b/editor/src/editor/GUIPiano.cpp @@ -92,7 +92,7 @@ void SPiano::draw(CDrawContext* dc) CRect textRect( rect.left, dim.labelBounds.top, rect.right, dim.labelBounds.bottom); - dc->setFont(font_); + dc->setFont(font); dc->setFontColor(labelStroke_); std::string text = std::to_string(static_cast(o) - 1); dc->drawString(text.c_str(), textRect, kCenterText);