diff --git a/resources/bitmaps/background_calf_black.png b/resources/bitmaps/background_calf_black.png
new file mode 100644
index 000000000..ae2e42414
Binary files /dev/null and b/resources/bitmaps/background_calf_black.png differ
diff --git a/resources/bitmaps/background_calf.png b/resources/bitmaps/background_calf_blue.png
similarity index 100%
rename from resources/bitmaps/background_calf.png
rename to resources/bitmaps/background_calf_blue.png
diff --git a/resources/bitmaps/logo_calf.png b/resources/bitmaps/logo_calf.png
index a857bbc2d..eb60e97b7 100644
Binary files a/resources/bitmaps/logo_calf.png and b/resources/bitmaps/logo_calf.png differ
diff --git a/resources/resources.qrc b/resources/resources.qrc
index 2d19c9496..02d531573 100644
--- a/resources/resources.qrc
+++ b/resources/resources.qrc
@@ -49,7 +49,8 @@
bitmaps/carla_about.png
bitmaps/background_3bandeq.png
- bitmaps/background_calf.png
+ bitmaps/background_calf_black.png
+ bitmaps/background_calf_blue.png
bitmaps/background_nekobi.png
bitmaps/background_nekobi_left.png
bitmaps/background_nekobi_right.png
@@ -89,6 +90,14 @@
bitmaps/dial_05d.png
bitmaps/dial_06.png
bitmaps/dial_06d.png
+ bitmaps/dial_07.png
+ bitmaps/dial_07d.png
+ bitmaps/dial_08.png
+ bitmaps/dial_08d.png
+ bitmaps/dial_09.png
+ bitmaps/dial_09d.png
+ bitmaps/dial_10.png
+ bitmaps/dial_10d.png
bitmaps/kbd_h_dark.png
bitmaps/kbd_v_dark.png
diff --git a/resources/ui/carla_plugin_calf.ui b/resources/ui/carla_plugin_calf.ui
index ecc633d67..d9b51d540 100644
--- a/resources/ui/carla_plugin_calf.ui
+++ b/resources/ui/carla_plugin_calf.ui
@@ -6,8 +6,8 @@
0
0
- 637
- 64
+ 643
+ 68
@@ -27,81 +27,23 @@
8
- 0
+ 3
8
- 8
+ 3
- -
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 71
- 30
-
-
-
-
- 71
- 30
-
-
-
-
-
-
- :/bitmaps/logo_calf.png
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
+
0
-
-
+
- audio out
+ AUDIO IN
Qt::AlignBottom|Qt::AlignHCenter
@@ -109,7 +51,7 @@
-
-
+
150
@@ -120,33 +62,73 @@
- -
-
-
- 0
-
+
-
+
-
-
+
+
+
+ 75
+ true
+
+
- audio in
+ TextLabel
- Qt::AlignBottom|Qt::AlignHCenter
+ Qt::AlignCenter
-
-
-
-
- 150
- 0
-
+
+
+ 3
-
+
-
+
+
+ GUI
+
+
+ true
+
+
+
+ -
+
+
+ Edit
+
+
+ true
+
+
+
+ -
+
+
+ Remove
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 1
+ 20
+
+
+
+
-
@@ -197,7 +179,7 @@
- 20
+ 1
40
@@ -205,59 +187,48 @@
- -
-
+
-
+
+
+ 0
+
-
-
-
-
- 75
- true
-
-
+
- TextLabel
+ AUDIO OUT
- Qt::AlignCenter
+ Qt::AlignBottom|Qt::AlignHCenter
-
-
-
-
-
-
- GUI
-
-
- true
-
-
-
- -
-
-
- Edit
-
-
- true
-
-
-
- -
-
-
- Remove
-
-
-
-
+
+
+
+ 150
+ 0
+
+
+
- -
-
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 1
+ 20
+
+
+
+
+ -
+
Qt::Horizontal
@@ -269,6 +240,72 @@
+ -
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 10
+ 20
+
+
+
+
+ -
+
+
+
+ 71
+ 30
+
+
+
+
+ 71
+ 30
+
+
+
+
+
+
+ :/bitmaps/logo_calf.png
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
diff --git a/source/carla_skin.py b/source/carla_skin.py
index 00fadfc81..713ee26b5 100644
--- a/source/carla_skin.py
+++ b/source/carla_skin.py
@@ -988,71 +988,25 @@ class PluginSlot_BasicFX(AbstractPluginSlot):
# ------------------------------------------------------------------------------------------------------------
-class PluginSlot_Nekobi(AbstractPluginSlot):
- def __init__(self, parent, pluginId):
- AbstractPluginSlot.__init__(self, parent, pluginId)
- #self.ui = ui_carla_plugin_basic_fx.Ui_PluginWidget()
- #self.ui.setupUi(self)
-
- # -------------------------------------------------------------
- # Set-up GUI
-
- self.fPixmapCenter = QPixmap(":/bitmaps/background_nekobi.png")
-
- self.fPixmapLeft = QPixmap(":/bitmaps/background_nekobi_left.png")
- self.fPixmapLeftRect = QRectF(0, 0, self.fPixmapLeft.width(), self.fPixmapLeft.height())
-
- self.fPixmapRight = QPixmap(":/bitmaps/background_nekobi_right.png")
- self.fPixmapRightRect = QRectF(0, 0, self.fPixmapRight.width(), self.fPixmapRight.height())
-
- #self.setStyleSheet("""
- #PluginSlot_Nekobi#PluginWidget {
- #background-image: url(:/bitmaps/background_nekobi.png);
- #background-repeat: repeat-xy;
- #}
- #QLabel#label_name {
- #color: #BBB;
- #}
- #""")
-
- #------------------------------------------------------------------
-
- def getFixedHeight(self):
- return 108
-
- #------------------------------------------------------------------
-
- def paintEvent(self, event):
- painter = QPainter(self)
-
- # main bg (center)
- painter.drawTiledPixmap(0, 0, self.width(), self.height(), self.fPixmapCenter)
-
- # left side
- painter.drawPixmap(self.fPixmapLeftRect, self.fPixmapLeft, self.fPixmapLeftRect)
-
- # right side
- rightTarget = QRectF(self.fPixmapRightRect)
- rightTarget.moveLeft(self.width()-rightTarget.width())
- painter.drawPixmap(rightTarget, self.fPixmapRight, self.fPixmapRightRect)
-
- AbstractPluginSlot.paintEvent(self, event)
-
-# ------------------------------------------------------------------------------------------------------------
-
class PluginSlot_Calf(AbstractPluginSlot):
def __init__(self, parent, pluginId):
AbstractPluginSlot.__init__(self, parent, pluginId)
self.ui = ui_carla_plugin_calf.Ui_PluginWidget()
self.ui.setupUi(self)
+ audioCount = gCarla.host.get_audio_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 2, 'outs': 2 }
+ midiCount = gCarla.host.get_midi_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 1, 'outs': 0 }
+
# -------------------------------------------------------------
# Internal stuff
- self.fButtonFont = QFont()
- #self.fButtonFont.setBold(False)
+ self.fButtonFont = self.ui.b_gui.font()
+ self.fButtonFont.setBold(False)
self.fButtonFont.setPointSize(8)
+ # Use black for mono plugins
+ self.fBackgroundBlack = audioCount['ins'] == 1
+
self.fButtonColorOn = QColor( 18, 41, 87)
self.fButtonColorOff = QColor(150, 150, 150)
@@ -1060,15 +1014,15 @@ class PluginSlot_Calf(AbstractPluginSlot):
# Set-up GUI
self.setStyleSheet("""
- QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi {
- color: black;
+ QLabel#label_name, QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi {
+ color: #BBB;
}
PluginSlot_Calf#PluginWidget {
- background-image: url(:/bitmaps/background_calf.png);
+ background-image: url(:/bitmaps/background_calf_%s.png);
background-repeat: repeat-xy;
border: 2px;
}
- """)
+ """ % ("black" if self.fBackgroundBlack else "blue"))
self.ui.b_gui.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png")
@@ -1084,12 +1038,9 @@ class PluginSlot_Calf(AbstractPluginSlot):
labelFont = self.ui.label_name.font()
labelFont.setBold(True)
- labelFont.setPointSize(labelFont.pointSize()+3)
+ labelFont.setPointSize(10)
self.ui.label_name.setFont(labelFont)
- audioCount = gCarla.host.get_audio_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 2, 'outs': 2 }
- midiCount = gCarla.host.get_midi_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 1, 'outs': 0 }
-
if audioCount['ins'] == 0:
self.ui.label_audio_in.hide()
self.ui.peak_in.hide()
@@ -1105,6 +1056,45 @@ class PluginSlot_Calf(AbstractPluginSlot):
self.ui.label_midi.hide()
self.ui.led_midi.hide()
+ # -------------------------------------------------------------
+ # Set-up parameters
+
+ parameterCount = gCarla.host.get_parameter_count(self.fPluginId) if gCarla.host is not None else 0
+
+ index = 0
+ limit = 7 if midiCount['ins'] == 0 else 6
+ for i in range(parameterCount):
+ if index >= limit:
+ break
+
+ paramInfo = gCarla.host.get_parameter_info(self.fPluginId, i)
+ paramData = gCarla.host.get_parameter_data(self.fPluginId, i)
+ paramRanges = gCarla.host.get_parameter_ranges(self.fPluginId, i)
+
+ if paramData['type'] != PARAMETER_INPUT:
+ continue
+ if paramData['hints'] & PARAMETER_IS_BOOLEAN:
+ continue
+ if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0:
+ continue
+
+ paramName = getParameterShortName(paramInfo['name'])
+
+ widget = PixmapDial(self, i)
+ widget.setPixmap(7)
+ widget.setLabel(paramName)
+ widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT)
+ widget.setMinimum(paramRanges['min'])
+ widget.setMaximum(paramRanges['max'])
+
+ if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0:
+ widget.setEnabled(False)
+
+ self.ui.w_knobs.layout().insertWidget(index, widget)
+ index += 1
+
+ self.fParameterList.append([i, widget])
+
# -------------------------------------------------------------
self.b_gui = self.ui.b_gui
@@ -1126,7 +1116,7 @@ class PluginSlot_Calf(AbstractPluginSlot):
#------------------------------------------------------------------
def getFixedHeight(self):
- return 70
+ return 88
#------------------------------------------------------------------
@@ -1138,6 +1128,72 @@ class PluginSlot_Calf(AbstractPluginSlot):
AbstractPluginSlot.pluginHintsChanged(self, hints)
+ #------------------------------------------------------------------
+
+ def paintEvent(self, event):
+ painter = QPainter(self)
+ painter.setBrush(Qt.transparent)
+
+ painter.setPen(QPen(QColor(20, 20, 20) if self.fBackgroundBlack else QColor(75, 86, 99), 1))
+ painter.drawRect(0, 1, self.width()-1, 88-3)
+
+ painter.setPen(QPen(QColor(45, 45, 45) if self.fBackgroundBlack else QColor(86, 99, 114), 1))
+ painter.drawLine(0, 0, self.width(), 0)
+
+ AbstractPluginSlot.paintEvent(self, event)
+
+# ------------------------------------------------------------------------------------------------------------
+
+class PluginSlot_Nekobi(AbstractPluginSlot):
+ def __init__(self, parent, pluginId):
+ AbstractPluginSlot.__init__(self, parent, pluginId)
+ #self.ui = ui_carla_plugin_basic_fx.Ui_PluginWidget()
+ #self.ui.setupUi(self)
+
+ # -------------------------------------------------------------
+ # Set-up GUI
+
+ self.fPixmapCenter = QPixmap(":/bitmaps/background_nekobi.png")
+
+ self.fPixmapLeft = QPixmap(":/bitmaps/background_nekobi_left.png")
+ self.fPixmapLeftRect = QRectF(0, 0, self.fPixmapLeft.width(), self.fPixmapLeft.height())
+
+ self.fPixmapRight = QPixmap(":/bitmaps/background_nekobi_right.png")
+ self.fPixmapRightRect = QRectF(0, 0, self.fPixmapRight.width(), self.fPixmapRight.height())
+
+ #self.setStyleSheet("""
+ #PluginSlot_Nekobi#PluginWidget {
+ #background-image: url(:/bitmaps/background_nekobi.png);
+ #background-repeat: repeat-xy;
+ #}
+ #QLabel#label_name {
+ #color: #BBB;
+ #}
+ #""")
+
+ #------------------------------------------------------------------
+
+ def getFixedHeight(self):
+ return 108
+
+ #------------------------------------------------------------------
+
+ def paintEvent(self, event):
+ painter = QPainter(self)
+
+ # main bg (center)
+ painter.drawTiledPixmap(0, 0, self.width(), self.height(), self.fPixmapCenter)
+
+ # left side
+ painter.drawPixmap(self.fPixmapLeftRect, self.fPixmapLeft, self.fPixmapLeftRect)
+
+ # right side
+ rightTarget = QRectF(self.fPixmapRightRect)
+ rightTarget.moveLeft(self.width()-rightTarget.width())
+ painter.drawPixmap(rightTarget, self.fPixmapRight, self.fPixmapRightRect)
+
+ AbstractPluginSlot.paintEvent(self, event)
+
# ------------------------------------------------------------------------------------------------------------
class PluginSlot_ZitaRev(AbstractPluginSlot):
diff --git a/source/widgets/pixmapdial.py b/source/widgets/pixmapdial.py
index 2def7e493..5ad5fb13c 100644
--- a/source/widgets/pixmapdial.py
+++ b/source/widgets/pixmapdial.py
@@ -159,7 +159,7 @@ class PixmapDial(QDial):
self.fLabelPos.setX(float(self.fPixmapBaseSize)/2.0 - float(self.fLabelWidth)/2.0)
- if self.fPixmapNum in ("01", "02"):
+ if self.fPixmapNum in ("01", "02", "07", "08", "09", "10"):
self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight)
else:
self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight/2)