Browse Source

Workaround qt bug that makes edit dialog resizable to 0

tags/1.9.5
falkTX 10 years ago
parent
commit
ba08d6cb3a
4 changed files with 17 additions and 9 deletions
  1. +1
    -1
      resources/ui/carla_edit.ui
  2. +1
    -1
      source/backend/CarlaBackend.h
  3. +1
    -1
      source/carla_backend.py
  4. +14
    -6
      source/carla_widgets.py

+ 1
- 1
resources/ui/carla_edit.ui View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<width>469</width>
<height>407</height>
</rect>
</property>


+ 1
- 1
source/backend/CarlaBackend.h View File

@@ -197,7 +197,7 @@ const uint PLUGIN_OPTION_FORCE_STEREO = 0x002;
const uint PLUGIN_OPTION_MAP_PROGRAM_CHANGES = 0x004;

/*!
* Use chunks to save and restore data.
* Use chunks to save and restore data instead of parameter values.
*/
const uint PLUGIN_OPTION_USE_CHUNKS = 0x008;



+ 1
- 1
source/carla_backend.py View File

@@ -225,7 +225,7 @@ PLUGIN_OPTION_FORCE_STEREO = 0x002
# Map MIDI programs to plugin programs.
PLUGIN_OPTION_MAP_PROGRAM_CHANGES = 0x004

# Use chunks to save and restore data.
# Use chunks to save and restore data instead of parameter values.
PLUGIN_OPTION_USE_CHUNKS = 0x008

# Send MIDI control change events.


+ 14
- 6
source/carla_widgets.py View File

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

if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings, QTimer
from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt5.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings, QTimer
from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget

@@ -584,6 +584,14 @@ class PluginEdit(QDialog):

self.fFirstInit = False

# Workaround for a Qt4 bug, see https://bugreports.qt-project.org/browse/QTBUG-7792
QTimer.singleShot(0, self.slot_fixNameWordWrap)

@pyqtSlot()
def slot_fixNameWordWrap(self):
self.adjustSize()
self.setMinimumSize(self.width(), self.height())

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

def reloadInfo(self):
@@ -1478,11 +1486,11 @@ if __name__ == '__main__':

app = CarlaApplication()

gui1 = CarlaAboutW(None)
gui1.show()
#gui1 = CarlaAboutW(None)
#gui1.show()

gui2 = PluginParameter(None, gFakeParamInfo, 0, 0)
gui2.show()
#gui2 = PluginParameter(None, gFakeParamInfo, 0, 0)
#gui2.show()

gui3 = PluginEdit(None, 0)
gui3.show()


Loading…
Cancel
Save