Browse Source

Add rack interior metal strips

tags/1.9.4
falkTX 11 years ago
parent
commit
0a183333c1
6 changed files with 15 additions and 6 deletions
  1. BIN
      resources/bitmaps/rack_interior_left.png
  2. BIN
      resources/bitmaps/rack_interior_right.png
  3. BIN
      resources/bitmaps/rack_padding_left.png
  4. BIN
      resources/bitmaps/rack_padding_right.png
  5. +4
    -2
      resources/resources.qrc
  6. +11
    -4
      source/carla_rack.py

BIN
resources/bitmaps/rack_interior_left.png View File

Before After
Width: 34  |  Height: 70  |  Size: 5.6KB

BIN
resources/bitmaps/rack_interior_right.png View File

Before After
Width: 34  |  Height: 70  |  Size: 5.7KB

BIN
resources/bitmaps/rack_padding_left.png View File

Before After
Width: 25  |  Height: 372  |  Size: 39KB

BIN
resources/bitmaps/rack_padding_right.png View File

Before After
Width: 25  |  Height: 372  |  Size: 8.3KB

+ 4
- 2
resources/resources.qrc View File

@@ -110,8 +110,10 @@

<file>bitmaps/logo_calf.png</file>

<file>bitmaps/padding_left.png</file>
<file>bitmaps/padding_right.png</file>
<file>bitmaps/rack_interior_left.png</file>
<file>bitmaps/rack_interior_right.png</file>
<file>bitmaps/rack_padding_left.png</file>
<file>bitmaps/rack_padding_right.png</file>

<file>bitmaps/canvas/frame_node_header.png</file>
<file>bitmaps/canvas/frame_port_bg.png</file>


+ 11
- 4
source/carla_rack.py View File

@@ -20,7 +20,7 @@
# Imports (Global)

from PyQt4.QtCore import Qt, QSize, QTimer
from PyQt4.QtGui import QApplication, QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QScrollBar
from PyQt4.QtGui import QApplication, QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QPixmap, QScrollBar

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
@@ -77,8 +77,15 @@ class CarlaRackList(QListWidget):
def __init__(self, parent):
QListWidget.__init__(self, parent)

self.fPixmapL = QPixmap(":/bitmaps/rack_interior_left.png")
self.fPixmapR = QPixmap(":/bitmaps/rack_interior_right.png")

self.fPixmapWidth = self.fPixmapL.width()

def paintEvent(self, event):
#painter = QPainter(self)
painter = QPainter(self.viewport())
painter.drawTiledPixmap(0, 0, self.fPixmapWidth, self.height(), self.fPixmapL)
painter.drawTiledPixmap(self.width()-self.fPixmapWidth-2, 0, self.fPixmapWidth, self.height(), self.fPixmapR)
QListWidget.paintEvent(self, event)

# ------------------------------------------------------------------------------------------------------------
@@ -151,11 +158,11 @@ class CarlaRackW(QFrame):

self.setStyleSheet("""
QLabel#PadLeft {
background-image: url(:/bitmaps/padding_left.png);
background-image: url(:/bitmaps/rack_padding_left.png);
background-repeat: repeat-y;
}
QLabel#PadRight {
background-image: url(:/bitmaps/padding_right.png);
background-image: url(:/bitmaps/rack_padding_right.png);
background-repeat: repeat-y;
}
QListWidget {


Loading…
Cancel
Save