Browse Source

Import fixes from main branch

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.9
falkTX falkTX <falktx@falktx.com> 2 months ago
parent
commit
c16c8ed87c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
5 changed files with 19 additions and 8 deletions
  1. +1
    -0
      source/bridges-plugin/Makefile
  2. +10
    -1
      source/frontend/patchcanvas/canvasport.py
  3. +2
    -2
      source/frontend/widgets/canvaspreviewframe.py
  4. +3
    -2
      source/frontend/widgets/pixmapdial.py
  5. +3
    -3
      source/frontend/widgets/scalabledial.py

+ 1
- 0
source/bridges-plugin/Makefile View File

@@ -177,6 +177,7 @@ NATIVE_LINK_FLAGS += $(LIBLO_LIBS)
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)

NATIVE_BUILD_FLAGS += $(MAGIC_FLAGS)
NATIVE_LINK_FLAGS += $(MAGIC_LIBS)

LIBS_native += $(MODULEDIR)/audio_decoder.a


+ 10
- 1
source/frontend/patchcanvas/canvasport.py View File

@@ -120,7 +120,16 @@ class CanvasPort(QGraphicsItem):
self.update()

def setPortName(self, port_name):
if QFontMetrics(self.m_port_font).width(port_name) < QFontMetrics(self.m_port_font).width(self.m_port_name):
metrics = QFontMetrics(self.m_port_font)

if QT_VERSION >= 0x50b00:
width1 = metrics.horizontalAdvance(port_name)
width2 = metrics.horizontalAdvance(self.m_port_name)
else:
width1 = metrics.width(port_name)
width2 = metrics.width(self.m_port_name)

if width1 < width2:
QTimer.singleShot(0, canvas.scene.update)

self.m_port_name = port_name


+ 2
- 2
source/frontend/widgets/canvaspreviewframe.py View File

@@ -207,7 +207,7 @@ class CanvasPreviewFrame(QFrame):
if event.button() == Qt.LeftButton:
event.accept()
self.fMouseLeftDown = False
self._updateMouseMode()
self._updateMouseMode(event)
return
if event.button() == Qt.RightButton:
event.accept()
@@ -386,7 +386,7 @@ class CanvasPreviewFrame(QFrame):

self.cursor().setPos(self.fMouseInitialZoomPos)

def _updateMouseMode(self, event = None):
def _updateMouseMode(self, event):
if self.fMouseLeftDown and self.fMouseRightDown:
self.fMouseInitialZoomPos = event.globalPos()
self.setCursor(self.fZoomCursors[self._kCursorZoom])


+ 3
- 2
source/frontend/widgets/pixmapdial.py View File

@@ -72,8 +72,9 @@ class PixmapDial(CommonDial):
self.fLabelWidth = 0
return

self.fLabelWidth = QFontMetrics(self.fLabelFont).width(self.fLabel)
self.fLabelHeight = QFontMetrics(self.fLabelFont).height()
metrics = QFontMetrics(self.fLabelFont)
self.fLabelWidth = fontMetricsHorizontalAdvance(metrics, self.fLabel)
self.fLabelHeight = metrics.height()

self.fLabelPos.setX(float(self.fPixmapBaseSize)/2.0 - float(self.fLabelWidth)/2.0)



+ 3
- 3
source/frontend/widgets/scalabledial.py View File

@@ -76,8 +76,9 @@ class ScalableDial(CommonDial):
self.fLabelWidth = 0
return

self.fLabelWidth = QFontMetrics(self.fLabelFont).width(self.fLabel)
self.fLabelHeight = QFontMetrics(self.fLabelFont).height()
metrics = QFontMetrics(self.fLabelFont)
self.fLabelWidth = fontMetricsHorizontalAdvance(metrics, self.fLabel)
self.fLabelHeight = metrics.height()

self.fLabelPos.setX(float(self.fImageBaseSize)/2.0 - float(self.fLabelWidth)/2.0)

@@ -281,7 +282,6 @@ class ScalableDial(CommonDial):

# Custom knobs
else:
painter.restore()
return

if self.HOVER_MIN < self.fHoverStep < self.HOVER_MAX:


Loading…
Cancel
Save