diff --git a/resources/ui/carla_host.ui b/resources/ui/carla_host.ui index ab3af9265..cbe38d615 100644 --- a/resources/ui/carla_host.ui +++ b/resources/ui/carla_host.ui @@ -15,7 +15,16 @@ - + + 0 + + + 2 + + + 0 + + 0 @@ -23,14 +32,6 @@ Qt::Horizontal - - - - 0 - 0 - - - @@ -54,7 +55,7 @@ false - QTabWidget::East + QTabWidget::West 0 diff --git a/resources/ui/carla_plugin_calf.ui b/resources/ui/carla_plugin_calf.ui index ffbdd3a1d..0d25f4197 100644 --- a/resources/ui/carla_plugin_calf.ui +++ b/resources/ui/carla_plugin_calf.ui @@ -6,8 +6,8 @@ 0 0 - 644 - 80 + 637 + 64 @@ -35,116 +35,65 @@ 8 - - - - - - - 75 - true - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - GUI - - - true - - - - - - - Edit - - - true - - - - - - - Remove - - - - - - - - - + + 0 - - - MIDI + + + Qt::Horizontal - - Qt::AlignCenter + + + 40 + 20 + - + - + - 25 - 25 + 71 + 30 - 25 - 25 + 71 + 30 - - - 25 - 25 - + + :/bitmaps/logo_calf.png - - true + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + 0 @@ -171,7 +120,7 @@ - + 0 @@ -198,53 +147,117 @@ - - + + 0 - - - Qt::Horizontal + + + MIDI - - - 40 - 20 - + + Qt::AlignCenter - + - + - 71 - 30 + 25 + 25 - 71 - 30 + 25 + 25 - - :/bitmaps/logo_calf.png + + + 25 + 25 + + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + 75 + true + + + + TextLabel - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignCenter + + + + + + GUI + + + true + + + + + + + Edit + + + true + + + + + + + Remove + + + + + - - + + Qt::Horizontal diff --git a/source/carla b/source/carla index 584c3b455..aac089698 100755 --- a/source/carla +++ b/source/carla @@ -175,6 +175,7 @@ class CarlaHostW(HostWindow): self.fInfoText = "" self.fInfoLabel = QLabel(self) + self.fInfoLabel.setAlignment(Qt.AlignRight|Qt.AlignVCenter) self.fInfoLabel.setText("Engine stopped") # ------------------------------------------------------------- @@ -196,28 +197,31 @@ class CarlaHostW(HostWindow): # ----------------------------------------------------------------- - def updateInfoLabelPos(self): + def updateInfoLabelXandSize(self): 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(): y -= self.ui.toolBar.height() 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() def slot_initWidgets(self): 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.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 self.fContainer.setCurrentIndex(1) @@ -226,17 +230,17 @@ class CarlaHostW(HostWindow): @pyqtSlot() def slot_splitterMoved(self): - self.updateInfoLabelSize() + self.updateInfoLabelXandSize() @pyqtSlot() def slot_toolbarShown(self): - self.updateInfoLabelPos() + self.updateInfoLabelY() # ----------------------------------------------------------------- def resizeEvent(self, event): HostWindow.resizeEvent(self, event) - self.updateInfoLabelSize() + self.updateInfoLabelXandSize() def timerEvent(self, event): HostWindow.timerEvent(self, event) diff --git a/source/carla_host.py b/source/carla_host.py index 024280105..801129761 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -309,9 +309,7 @@ class HostWindow(QMainWindow): else: 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): canvasWidth, canvasHeight, canvasBg, canvasBrush, canvasPen = canvasThemeData diff --git a/source/carla_rack.py b/source/carla_rack.py index fdfdcf579..941615d95 100644 --- a/source/carla_rack.py +++ b/source/carla_rack.py @@ -72,7 +72,7 @@ class CarlaRackW(QListWidget): # ------------------------------------------------------------- # Set-up GUI stuff - #self.setMnimumWidth(800) + self.setMinimumWidth(591) self.setSortingEnabled(False) app = QApplication.instance() diff --git a/source/widgets/ledbutton.py b/source/widgets/ledbutton.py index ba4b37ff8..62c8008eb 100644 --- a/source/widgets/ledbutton.py +++ b/source/widgets/ledbutton.py @@ -86,7 +86,7 @@ class LEDButton(QPushButton): elif self.fColor == self.YELLOW: self.fPixmap.load(":/bitmaps/led_yellow.png") elif self.fColor == self.CALF: - self.fPixmap.load(":/bitmaps/calf_on.png") + self.fPixmap.load(":/bitmaps/led_calf_on.png") else: return