diff --git a/plugins/carlabase/CMakeLists.txt b/plugins/carlabase/CMakeLists.txt index 82c31dbd0..ca6ab5fa1 100644 --- a/plugins/carlabase/CMakeLists.txt +++ b/plugins/carlabase/CMakeLists.txt @@ -3,7 +3,7 @@ if(LMMS_HAVE_CARLA) INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS}) LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(${CARLA_LIBRARIES}) - BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h) + BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") SET_TARGET_PROPERTIES(carlabase PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE diff --git a/plugins/carlabase/artwork-patchbay.png b/plugins/carlabase/artwork-patchbay.png new file mode 100644 index 000000000..4c6011c1c Binary files /dev/null and b/plugins/carlabase/artwork-patchbay.png differ diff --git a/plugins/carlabase/artwork-rack.png b/plugins/carlabase/artwork-rack.png new file mode 100644 index 000000000..1a5b48a1a Binary files /dev/null and b/plugins/carlabase/artwork-rack.png differ diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index 81f724473..eb60123c0 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -29,6 +29,7 @@ #include "engine.h" #include "song.h" +#include "gui_templates.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -40,6 +41,8 @@ #include +#include "embed.cpp" + // this doesn't seem to be defined anywhere static const double ticksPerBeat = 48.0; @@ -48,7 +51,6 @@ static const double ticksPerBeat = 48.0; * - get plugin instance name (to use in external window title) * - offline mode change callback * - midi output - * - background artwork * * All other items are to be done in Carla itself. */ @@ -470,19 +472,19 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid { setAutoFillBackground(true); - //QPalette pal; - //pal.setBrush(backgroundRole(), PLUGIN_NAME::getIconPixmap("artwork")); - //setPalette(pal); + QPalette pal; + pal.setBrush(backgroundRole(), instrument->kIsPatchbay ? PLUGIN_NAME::getIconPixmap("artwork-patchbay") : PLUGIN_NAME::getIconPixmap("artwork-rack")); + setPalette(pal); QVBoxLayout * l = new QVBoxLayout( this ); - l->setContentsMargins( 20, 80, 10, 10 ); + l->setContentsMargins( 20, 180, 10, 10 ); l->setSpacing( 10 ); m_toggleUIButton = new QPushButton( tr( "Show GUI" ), this ); m_toggleUIButton->setCheckable( true ); m_toggleUIButton->setChecked( false ); - //m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) ); - //m_toggleUIButton->setFont( pointSize<8>( m_toggleUIButton->font() ) ); + m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) ); + m_toggleUIButton->setFont( pointSize<8>( m_toggleUIButton->font() ) ); connect( m_toggleUIButton, SIGNAL( clicked(bool) ), this, SLOT( toggleUI( bool ) ) ); m_toggleUIButton->setWhatsThis(