Browse Source

Misc

tags/1.9.4
falkTX 10 years ago
parent
commit
146eb2d6a9
6 changed files with 70 additions and 6 deletions
  1. BIN
      resources/bitmaps/background_3bandeq.png
  2. BIN
      resources/bitmaps/background_nekobi.png
  3. BIN
      resources/bitmaps/background_nekobi_left.png
  4. BIN
      resources/bitmaps/background_nekobi_right.png
  5. +4
    -0
      resources/resources.qrc
  6. +66
    -6
      source/carla_skin.py

BIN
resources/bitmaps/background_3bandeq.png View File

Before After
Width: 46  |  Height: 138  |  Size: 33KB

BIN
resources/bitmaps/background_nekobi.png View File

Before After
Width: 1  |  Height: 108  |  Size: 258B

BIN
resources/bitmaps/background_nekobi_left.png View File

Before After
Width: 313  |  Height: 108  |  Size: 13KB

BIN
resources/bitmaps/background_nekobi_right.png View File

Before After
Width: 285  |  Height: 108  |  Size: 9.6KB

+ 4
- 0
resources/resources.qrc View File

@@ -47,7 +47,11 @@
<file>scalable/carla-control.svg</file> <file>scalable/carla-control.svg</file>


<file>bitmaps/carla_about.png</file> <file>bitmaps/carla_about.png</file>
<file>bitmaps/background_3bandeq.png</file>
<file>bitmaps/background_calf.png</file> <file>bitmaps/background_calf.png</file>
<file>bitmaps/background_nekobi.png</file>
<file>bitmaps/background_nekobi_left.png</file>
<file>bitmaps/background_nekobi_right.png</file>
<file>bitmaps/background_noise1.png</file> <file>bitmaps/background_noise1.png</file>
<file>bitmaps/background_noise2.png</file> <file>bitmaps/background_noise2.png</file>
<file>bitmaps/background_zynfx.png</file> <file>bitmaps/background_zynfx.png</file>


+ 66
- 6
source/carla_skin.py View File

@@ -25,12 +25,12 @@ from carla_config import *
# Imports (Global) # Imports (Global)


if config_UseQt5: if config_UseQt5:
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont, QPen
from PyQt5.QtCore import Qt, QRectF
from PyQt5.QtGui import QFont, QPen, QPixmap
from PyQt5.QtWidgets import QFrame, QPushButton from PyQt5.QtWidgets import QFrame, QPushButton
else: else:
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QFont, QFrame, QPen, QPushButton
from PyQt4.QtCore import Qt, QRectF
from PyQt4.QtGui import QFont, QFrame, QPen, QPixmap, QPushButton


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)
@@ -719,16 +719,21 @@ class PluginSlot_BasicFX(AbstractPluginSlot):
r += 10 r += 10
g += 10 g += 10


bg = "noise1"

if self.fPluginInfo['maker'] in ("falkTX, Michael Gruhn", "DISTRHO") and "3bandeq" in self.fPluginInfo['label'].lower():
bg = "3bandeq"

self.setStyleSheet(""" self.setStyleSheet("""
PluginSlot_BasicFX#PluginWidget { PluginSlot_BasicFX#PluginWidget {
background-color: rgb(%i, %i, %i); background-color: rgb(%i, %i, %i);
background-image: url(:/bitmaps/background_noise1.png);
background-image: url(:/bitmaps/background_%s.png);
background-repeat: repeat-xy; background-repeat: repeat-xy;
} }
QLabel#label_name { QLabel#label_name {
color: #BBB; color: #BBB;
} }
""" % (r, g, b))
""" % (r, g, b, bg))


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")
@@ -868,6 +873,58 @@ 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): class PluginSlot_Calf(AbstractPluginSlot):
def __init__(self, parent, pluginId): def __init__(self, parent, pluginId):
AbstractPluginSlot.__init__(self, parent, pluginId) AbstractPluginSlot.__init__(self, parent, pluginId)
@@ -1315,6 +1372,9 @@ def createPluginSlot(parent, pluginId):
if pluginName.split(" ", 1)[0].lower() == "calf": if pluginName.split(" ", 1)[0].lower() == "calf":
return PluginSlot_Calf(parent, pluginId) return PluginSlot_Calf(parent, pluginId)


#if pluginName.lower() == "nekobi":
#return PluginSlot_Nekobi(parent, pluginId)

return PluginSlot_BasicFX(parent, pluginId) return PluginSlot_BasicFX(parent, pluginId)
return PluginSlot_Default(parent, pluginId) return PluginSlot_Default(parent, pluginId)




Loading…
Cancel
Save