Преглед изворни кода

UI: Emit DisplayResized() viewport signal

This allows knowing when the graphics viewport itself changes in size
(in case the window with the graphics viewport does not change size)
jp9000 пре 10 година
родитељ
комит
bf6e83821c
1 измењених фајлова са 9 додато и 0 уклоњено
  1. 9 0
      obs/qt-display.hpp

+ 9 - 0
obs/qt-display.hpp

@@ -5,6 +5,15 @@
 class OBSQTDisplay : public QWidget {
 	Q_OBJECT
 
+	virtual void resizeEvent(QResizeEvent *event)
+	{
+		emit DisplayResized();
+		QWidget::resizeEvent(event);
+	}
+
+signals:
+	void DisplayResized();
+
 public:
 	inline OBSQTDisplay(QWidget *parent = 0, Qt::WindowFlags flags = 0)
 		: QWidget(parent, flags)