Browse Source

Put disk-browser on left, content on right; calf skin fix

tags/1.9.4
falkTX 11 years ago
parent
commit
507319ce3f
6 changed files with 152 additions and 136 deletions
  1. +11
    -10
      resources/ui/carla_host.ui
  2. +122
    -109
      resources/ui/carla_plugin_calf.ui
  3. +16
    -12
      source/carla
  4. +1
    -3
      source/carla_host.py
  5. +1
    -1
      source/carla_rack.py
  6. +1
    -1
      source/widgets/ledbutton.py

+ 11
- 10
resources/ui/carla_host.ui View File

@@ -15,7 +15,16 @@
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@@ -23,14 +32,6 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QWidget" name="mainwidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing"> <property name="spacing">
@@ -54,7 +55,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tabPosition"> <property name="tabPosition">
<enum>QTabWidget::East</enum>
<enum>QTabWidget::West</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>


+ 122
- 109
resources/ui/carla_plugin_calf.ui View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>644</width>
<height>80</height>
<width>637</width>
<height>64</height>
</rect> </rect>
</property> </property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
@@ -35,116 +35,65 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>8</number> <number>8</number>
</property> </property>
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_name">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="PixmapButton" name="b_gui">
<property name="text">
<string>GUI</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="text">
<string>Edit</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_remove">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="0" column="2" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item row="1" column="4" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="label_midi">
<property name="text">
<string>MIDI</string>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property> </property>
</widget>
</spacer>
</item> </item>
<item> <item>
<widget class="LEDButton" name="led_midi">
<widget class="QLabel" name="label_logo">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width>
<height>25</height>
<width>71</width>
<height>30</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width>
<height>25</height>
<width>71</width>
<height>30</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/bitmaps/logo_calf.png</pixmap>
</property> </property>
<property name="checkable">
<bool>true</bool>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="0" column="4">
<item row="0" column="1" rowspan="2">
<spacer name="horizontalSpacer_2">
<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 row="0" column="5">
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
@@ -171,7 +120,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="3">
<item row="0" column="4">
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
@@ -198,53 +147,117 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="3" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="0" column="2" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QLabel" name="label_midi">
<property name="text">
<string>MIDI</string>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</spacer>
</widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_logo">
<widget class="LEDButton" name="led_midi">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>71</width>
<height>30</height>
<width>25</width>
<height>25</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>71</width>
<height>30</height>
<width>25</width>
<height>25</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/bitmaps/logo_calf.png</pixmap>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_name">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>TextLabel</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>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="PixmapButton" name="b_gui">
<property name="text">
<string>GUI</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="text">
<string>Edit</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_remove">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</item> </item>
<item row="0" column="1" rowspan="2">
<spacer name="horizontalSpacer_2">
<item row="0" column="3" rowspan="2">
<spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>


+ 16
- 12
source/carla View File

@@ -175,6 +175,7 @@ class CarlaHostW(HostWindow):


self.fInfoText = "" self.fInfoText = ""
self.fInfoLabel = QLabel(self) self.fInfoLabel = QLabel(self)
self.fInfoLabel.setAlignment(Qt.AlignRight|Qt.AlignVCenter)
self.fInfoLabel.setText("Engine stopped") self.fInfoLabel.setText("Engine stopped")


# ------------------------------------------------------------- # -------------------------------------------------------------
@@ -196,28 +197,31 @@ class CarlaHostW(HostWindow):


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


def updateInfoLabelPos(self):
def updateInfoLabelXandSize(self):
tabBar = self.fContainer.tabBar() tabBar = self.fContainer.tabBar()
y = tabBar.mapFromParent(self.ui.centralwidget.pos()).y() #+tabBar.height()/4
x = tabBar.width() + self.ui.tabUtils.width() + 20
self.fInfoLabel.move(x, self.fInfoLabel.y())
self.fInfoLabel.resize(self.fContainer.width()-tabBar.width()-20, self.fInfoLabel.height())

def updateInfoLabelY(self):
tabBar = self.fContainer.tabBar()
y = tabBar.mapFromParent(self.ui.centralwidget.pos()).y()


if not self.ui.toolBar.isVisible(): if not self.ui.toolBar.isVisible():
y -= self.ui.toolBar.height() y -= self.ui.toolBar.height()


self.fInfoLabel.move(self.fInfoLabel.x(), y) self.fInfoLabel.move(self.fInfoLabel.x(), y)


def updateInfoLabelSize(self):
tabBar = self.fContainer.tabBar()
self.fInfoLabel.resize(self.fContainer.width()-tabBar.width()-20, self.fInfoLabel.height())

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


@pyqtSlot() @pyqtSlot()
def slot_initWidgets(self): def slot_initWidgets(self):
tabBar = self.fContainer.tabBar() tabBar = self.fContainer.tabBar()
x = tabBar.width()+20
y = tabBar.mapFromParent(self.ui.centralwidget.pos()).y() #+ tabBar.height()/4
x = tabBar.width() + self.ui.tabUtils.width() + 20
y = tabBar.mapFromParent(self.ui.centralwidget.pos()).y()

self.fInfoLabel.move(x, y) self.fInfoLabel.move(x, y)
self.fInfoLabel.resize(self.fContainer.width()-x, tabBar.height())
self.fInfoLabel.resize(self.fContainer.width()-tabBar.width()-20, tabBar.height())


# FIXME: Qt4 needs this so it properly creates & resizes the canvas # FIXME: Qt4 needs this so it properly creates & resizes the canvas
self.fContainer.setCurrentIndex(1) self.fContainer.setCurrentIndex(1)
@@ -226,17 +230,17 @@ class CarlaHostW(HostWindow):


@pyqtSlot() @pyqtSlot()
def slot_splitterMoved(self): def slot_splitterMoved(self):
self.updateInfoLabelSize()
self.updateInfoLabelXandSize()


@pyqtSlot() @pyqtSlot()
def slot_toolbarShown(self): def slot_toolbarShown(self):
self.updateInfoLabelPos()
self.updateInfoLabelY()


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


def resizeEvent(self, event): def resizeEvent(self, event):
HostWindow.resizeEvent(self, event) HostWindow.resizeEvent(self, event)
self.updateInfoLabelSize()
self.updateInfoLabelXandSize()


def timerEvent(self, event): def timerEvent(self, event):
HostWindow.timerEvent(self, event) HostWindow.timerEvent(self, event)


+ 1
- 3
source/carla_host.py View File

@@ -309,9 +309,7 @@ class HostWindow(QMainWindow):
else: else:
self.ui.miniCanvasPreview.hide() self.ui.miniCanvasPreview.hide()


self.ui.mainwidget.hide()
del self.ui.mainwidget
self.ui.splitter.insertWidget(0, self.fContainer)
self.ui.splitter.insertWidget(1, self.fContainer)


def updateContainer(self, canvasThemeData): def updateContainer(self, canvasThemeData):
canvasWidth, canvasHeight, canvasBg, canvasBrush, canvasPen = canvasThemeData canvasWidth, canvasHeight, canvasBg, canvasBrush, canvasPen = canvasThemeData


+ 1
- 1
source/carla_rack.py View File

@@ -72,7 +72,7 @@ class CarlaRackW(QListWidget):
# ------------------------------------------------------------- # -------------------------------------------------------------
# Set-up GUI stuff # Set-up GUI stuff


#self.setMnimumWidth(800)
self.setMinimumWidth(591)
self.setSortingEnabled(False) self.setSortingEnabled(False)


app = QApplication.instance() app = QApplication.instance()


+ 1
- 1
source/widgets/ledbutton.py View File

@@ -86,7 +86,7 @@ class LEDButton(QPushButton):
elif self.fColor == self.YELLOW: elif self.fColor == self.YELLOW:
self.fPixmap.load(":/bitmaps/led_yellow.png") self.fPixmap.load(":/bitmaps/led_yellow.png")
elif self.fColor == self.CALF: elif self.fColor == self.CALF:
self.fPixmap.load(":/bitmaps/calf_on.png")
self.fPixmap.load(":/bitmaps/led_calf_on.png")
else: else:
return return




Loading…
Cancel
Save