Browse Source

Rework ZynFX skin; Adjust code to 'shortify' parameter names

tags/1.9.5
falkTX 10 years ago
parent
commit
94cb6dabee
4 changed files with 483 additions and 158 deletions
  1. +6
    -3
      resources/ui/carla_plugin_basic_fx.ui
  2. +380
    -113
      resources/ui/carla_plugin_zynfx.ui
  3. +97
    -37
      source/carla_skin.py
  4. +0
    -5
      source/widgets/pixmapdial.py

+ 6
- 3
resources/ui/carla_plugin_basic_fx.ui View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>378</width>
<height>69</height>
<width>374</width>
<height>71</height>
</rect> </rect>
</property> </property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
@@ -24,7 +24,7 @@
<number>2</number> <number>2</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>1</number>
<number>3</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>2</number> <number>2</number>
@@ -176,6 +176,9 @@
<property name="text"> <property name="text">
<string>PluginName</string> <string>PluginName</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>


+ 380
- 113
resources/ui/carla_plugin_zynfx.ui View File

@@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>458</width>
<width>559</width>
<height>75</height> <height>75</height>
</rect> </rect>
</property> </property>
@@ -22,128 +22,58 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin"> <property name="leftMargin">
<number>4</number>
<number>2</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>2</number>
<number>3</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<property name="horizontalSpacing">
<number>2</number>
</property>
<property name="verticalSpacing">
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0" rowspan="2">
<widget class="DigitalPeakMeter" name="peak_in" native="true">
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="0" column="4" rowspan="2">
<widget class="DigitalPeakMeter" name="peak_out" native="true">
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QWidget" name="container" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>306</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
<number>3</number>
<number>1</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="PixmapButton" name="b_enable"> <widget class="PixmapButton" name="b_enable">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@@ -171,14 +101,14 @@
<widget class="PixmapButton" name="b_edit"> <widget class="PixmapButton" name="b_edit">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@@ -202,50 +132,377 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_presets">
<property name="text">
<string>Preset:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>3</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="cb_presets">
<property name="minimumSize">
<size>
<width>125</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="label_name"> <widget class="QLabel" name="label_name">
<property name="text"> <property name="text">
<string>Name</string>
<string>PluginName</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2">
<spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>138</width>
<width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_presets">
<widget class="QLabel" name="spacer_counter">
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>160</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Preset:</string>
<string/>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="cb_presets">
<widget class="LEDButton" name="led_control">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>125</width>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_midi">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_in">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_out">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="lineWidth">
<number>0</number>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>10</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item>
<widget class="QWidget" name="w_screws_left" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="w_knobs" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_4"/>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="PixmapDial" name="dial_drywet">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="PixmapDial" name="dial_vol">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="DigitalPeakMeter" name="peak_in" native="true">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="DigitalPeakMeter" name="peak_out" native="true">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="w_screws_right" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@@ -259,11 +516,21 @@
<header>digitalpeakmeter.h</header> <header>digitalpeakmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LEDButton</class>
<extends>QPushButton</extends>
<header>ledbutton.h</header>
</customwidget>
<customwidget> <customwidget>
<class>PixmapButton</class> <class>PixmapButton</class>
<extends>QPushButton</extends> <extends>QPushButton</extends>
<header>pixmapbutton.h</header> <header>pixmapbutton.h</header>
</customwidget> </customwidget>
<customwidget>
<class>PixmapDial</class>
<extends>QDial</extends>
<header>pixmapdial.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../resources.qrc"/> <include location="../resources.qrc"/>


+ 97
- 37
source/carla_skin.py View File

@@ -44,10 +44,45 @@ import ui_carla_plugin_zynfx
from carla_widgets import * from carla_widgets import *
from pixmapdial import PixmapDial from pixmapdial import PixmapDial


# ------------------------------------------------------------------------------------------------------------
# Try to "shortify" a parameter name

def getParameterShortName(paramName):
paramName = paramName.split("/",1)[0].split(" (",1)[0].split(" [",1)[0].strip()
paramLow = paramName.lower()

# Cut generic names
if "bandwidth" in paramLow:
paramName = paramName.replace("andwidth", "w")
elif "distortion" in paramLow:
paramName = paramName.replace("istortion", "ist")
elif "frequency" in paramLow:
paramName = paramName.replace("requency", "req")
elif "output" in paramLow:
paramName = paramName.replace("utput", "ut")
elif "threshold" in paramLow:
paramName = paramName.replace("hreshold", "hres")

# Cut useless prefix
elif paramLow.startswith("room "):
paramName = paramName.split(" ",1)[1]

# Cut useless suffix
elif paramLow.endswith(" level"):
paramName = paramName.rsplit(" ",1)[0]
elif paramLow.endswith(" time"):
paramName = paramName.rsplit(" ",1)[0]

if len(paramName) > 8:
paramName = paramName[:8]

return paramName.strip()

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Abstract plugin slot # Abstract plugin slot


class AbstractPluginSlot(QFrame, PluginEditParentMeta, metaclass=PyQtMetaClass):
class AbstractPluginSlot(QFrame, PluginEditParentMeta):
#class AbstractPluginSlot(QFrame, PluginEditParentMeta, metaclass=PyQtMetaClass):
def __init__(self, parent, pluginId): def __init__(self, parent, pluginId):
QFrame.__init__(self, parent) QFrame.__init__(self, parent)


@@ -776,10 +811,9 @@ class PluginSlot_BasicFX(AbstractPluginSlot):
# ------------------------------------------------------------- # -------------------------------------------------------------
# Set-up GUI # Set-up GUI


labelFont = QFont()
labelFont = self.ui.label_name.font()
labelFont.setBold(True) labelFont.setBold(True)
labelFont.setPointSize(9) labelFont.setPointSize(9)

self.ui.label_name.setFont(labelFont) self.ui.label_name.setFont(labelFont)


r = 40 r = 40
@@ -847,23 +881,12 @@ class PluginSlot_BasicFX(AbstractPluginSlot):


if paramData['type'] != PARAMETER_INPUT: if paramData['type'] != PARAMETER_INPUT:
continue continue
if paramData['hints'] & PARAMETER_IS_BOOLEAN:
continue
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0:
continue continue


paramName = paramInfo['name'].split("/", 1)[0].split(" (", 1)[0].strip()
paramLow = paramName.lower()

if "Bandwidth" in paramName:
paramName = paramName.replace("Bandwidth", "Bw")
elif "Frequency" in paramName:
paramName = paramName.replace("Frequency", "Freq")
elif "Output" in paramName:
paramName = paramName.replace("Output", "Out")
elif paramLow == "threshold":
paramName = "Thres"

if len(paramName) > 9:
paramName = paramName[:9]
paramName = getParameterShortName(paramInfo['name'])


#if self.fPluginInfo['category'] == PLUGIN_CATEGORY_FILTER: #if self.fPluginInfo['category'] == PLUGIN_CATEGORY_FILTER:
#_r = 55 + float(i)/8*200 #_r = 55 + float(i)/8*200
@@ -892,7 +915,6 @@ class PluginSlot_BasicFX(AbstractPluginSlot):
widget.setCustomPaintColor(QColor(_r, _g, _b)) widget.setCustomPaintColor(QColor(_r, _g, _b))
widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_COLOR) widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_COLOR)
widget.forceWhiteLabelGradientText() widget.forceWhiteLabelGradientText()

widget.setMinimum(paramRanges['min']) widget.setMinimum(paramRanges['min'])
widget.setMaximum(paramRanges['max']) widget.setMaximum(paramRanges['max'])


@@ -957,7 +979,7 @@ class PluginSlot_BasicFX(AbstractPluginSlot):
painter.setBrush(Qt.transparent) painter.setBrush(Qt.transparent)


painter.setPen(QPen(QColor(42, 42, 42), 1)) painter.setPen(QPen(QColor(42, 42, 42), 1))
painter.drawRect(0, 1, self.width()-1, 76)
painter.drawRect(0, 1, self.width()-1, 79-3)


painter.setPen(QPen(QColor(60, 60, 60), 1)) painter.setPen(QPen(QColor(60, 60, 60), 1))
painter.drawLine(0, 0, self.width(), 0) painter.drawLine(0, 0, self.width(), 0)
@@ -1285,6 +1307,16 @@ class PluginSlot_ZynFX(AbstractPluginSlot):
self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png") self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png") self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png")


labelFont = self.ui.label_name.font()
labelFont.setBold(True)
labelFont.setPointSize(9)
self.ui.label_name.setFont(labelFont)

presetFont = self.ui.label_presets.font()
presetFont.setBold(True)
presetFont.setPointSize(8)
self.ui.label_presets.setFont(presetFont)

# ------------------------------------------------------------- # -------------------------------------------------------------
# Set-up parameters # Set-up parameters


@@ -1298,9 +1330,12 @@ class PluginSlot_ZynFX(AbstractPluginSlot):


if paramData['type'] != PARAMETER_INPUT: if paramData['type'] != PARAMETER_INPUT:
continue continue
if paramData['hints'] & PARAMETER_IS_BOOLEAN:
continue
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0:
continue


paramName = paramInfo['name'] paramName = paramInfo['name']
#paramLow = paramName.lower()


# real zyn fx plugins # real zyn fx plugins
if self.fPluginInfo['label'] == "zynalienwah": if self.fPluginInfo['label'] == "zynalienwah":
@@ -1363,35 +1398,44 @@ class PluginSlot_ZynFX(AbstractPluginSlot):
elif i == 9: paramName = "R.S." elif i == 9: paramName = "R.S."
elif i == 10: paramName = "I.del" elif i == 10: paramName = "I.del"


#elif paramLow.find("damp"):
#paramName = "Damp"
#elif paramLow.find("frequency"):
#paramName = "Freq"

# Cut generic names
#elif paramName == "Depth": paramName = "Dpth"
#elif paramName == "Feedback": paramName = "Fb"
#elif paramName == "L/R Cross": #paramName = "L/R"
#elif paramName == "Random": paramName = "Rnd"
else:
paramName = getParameterShortName(paramInfo['name'])


widget = PixmapDial(self, i) widget = PixmapDial(self, i)


widget.setPixmap(5) widget.setPixmap(5)
widget.setLabel(paramName) widget.setLabel(paramName)
widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT) widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT)
#widget.setMidWhiteText()

widget.setMinimum(paramRanges['min']) widget.setMinimum(paramRanges['min'])
widget.setMaximum(paramRanges['max']) widget.setMaximum(paramRanges['max'])


if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0:
widget.setEnabled(False) widget.setEnabled(False)


self.ui.container.layout().insertWidget(index, widget)
self.ui.w_knobs.layout().insertWidget(index, widget)
index += 1 index += 1


self.fParameterList.append([i, widget]) self.fParameterList.append([i, widget])


self.ui.dial_drywet.setIndex(PARAMETER_DRYWET)
self.ui.dial_drywet.setPixmap(5)
self.ui.dial_drywet.setLabel("Wet")
self.ui.dial_drywet.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT)
self.ui.dial_drywet.setMinimum(0.0)
self.ui.dial_drywet.setMaximum(1.0)
self.ui.dial_drywet.setVisible(self.fPluginInfo['hints'] & PLUGIN_CAN_DRYWET)

self.ui.dial_vol.setIndex(PARAMETER_VOLUME)
self.ui.dial_vol.setPixmap(5)
self.ui.dial_vol.setLabel("Vol")
self.ui.dial_vol.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT)
self.ui.dial_vol.setMinimum(0.0)
self.ui.dial_vol.setMaximum(1.27)
self.ui.dial_vol.setVisible(self.fPluginInfo['hints'] & PLUGIN_CAN_VOLUME)

self.fParameterList.append([PARAMETER_DRYWET, self.ui.dial_drywet])
self.fParameterList.append([PARAMETER_VOLUME, self.ui.dial_vol])

# ------------------------------------------------------------- # -------------------------------------------------------------
# Set-up MIDI programs # Set-up MIDI programs


@@ -1426,21 +1470,37 @@ class PluginSlot_ZynFX(AbstractPluginSlot):


self.label_name = self.ui.label_name self.label_name = self.ui.label_name


self.led_control = self.ui.led_control
self.led_midi = self.ui.led_midi
self.led_audio_in = self.ui.led_audio_in
self.led_audio_out = self.ui.led_audio_out

self.peak_in = self.ui.peak_in self.peak_in = self.ui.peak_in
self.peak_out = self.ui.peak_out self.peak_out = self.ui.peak_out


self.ready() self.ready()


self.peak_in.setOrientation(self.peak_in.VERTICAL)
self.peak_out.setOrientation(self.peak_out.VERTICAL)

self.customContextMenuRequested.connect(self.slot_showDefaultCustomMenu) self.customContextMenuRequested.connect(self.slot_showDefaultCustomMenu)
self.ui.cb_presets.currentIndexChanged.connect(self.slot_midiProgramChanged) self.ui.cb_presets.currentIndexChanged.connect(self.slot_midiProgramChanged)


#------------------------------------------------------------------ #------------------------------------------------------------------


def getFixedHeight(self): def getFixedHeight(self):
return 70
return 74

#------------------------------------------------------------------

def paintEvent(self, event):
painter = QPainter(self)
painter.setBrush(Qt.transparent)

painter.setPen(QPen(QColor(60, 60, 60), 1))
painter.drawRect(0, 1, self.width()-1, 74-3)

painter.setPen(QPen(QColor(94, 94, 94), 1))
painter.drawLine(0, 0, self.width(), 0)

AbstractPluginSlot.paintEvent(self, event)


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------




+ 0
- 5
source/widgets/pixmapdial.py View File

@@ -129,11 +129,6 @@ class PixmapDial(QDial):
self.fLabelGradientColor2 = QColor(0, 0, 0, 0) self.fLabelGradientColor2 = QColor(0, 0, 0, 0)
self.fLabelGradientColorT = [Qt.white, Qt.darkGray] self.fLabelGradientColorT = [Qt.white, Qt.darkGray]


#def setMidWhiteText(self):
#self.fColor1 = QColor(0, 0, 0, 255)
#self.fColor2 = QColor(0, 0, 0, 0)
#self.fColorT = [QColor("#BBB"), Qt.darkGray]

def updateSizes(self): def updateSizes(self):
self.fPixmapWidth = self.fPixmap.width() self.fPixmapWidth = self.fPixmap.width()
self.fPixmapHeight = self.fPixmap.height() self.fPixmapHeight = self.fPixmap.height()


Loading…
Cancel
Save