When monitor overlay is disabled, ensure we use the real fullscreen space...

When monitor overlay is disabled, ensure we use the real fullscreen space (don't reserve space for the ruler).
Fixes #371
parent bf741db0
......@@ -106,6 +106,12 @@ GLWidget::GLWidget(int id, QObject *parent)
qRegisterMetaType<Mlt::Frame>("Mlt::Frame");
qRegisterMetaType<SharedFrame>("SharedFrame");
if (m_id == Kdenlive::ClipMonitor && !(KdenliveSettings::displayClipMonitorInfo() & 0x01)) {
m_rulerHeight = 0;
} else if (!(KdenliveSettings::displayProjectMonitorInfo() & 0x01)) {
m_rulerHeight = 0;
}
setPersistentOpenGLContext(true);
setPersistentSceneGraph(true);
setClearBeforeRendering(false);
......@@ -1866,3 +1872,10 @@ void GLWidget::updateScaling()
}
#endif
}
void GLWidget::switchRuler(bool show)
{
m_rulerHeight = show ? QFontInfo(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)).pixelSize() * 1.5 : 0;
resizeGL(width(), height());
m_proxy->rulerHeightChanged();
}
......@@ -141,6 +141,8 @@ public:
void setConsumerProperty(const QString &name, const QString &value);
/** @brief Clear consumer cache */
void purgeCache();
/** @brief Show / hide monitor ruler */
void switchRuler(bool show);
protected:
void mouseReleaseEvent(QMouseEvent *event) override;
......
......@@ -1530,6 +1530,10 @@ void Monitor::switchMonitorInfo(int code)
KdenliveSettings::setDisplayProjectMonitorInfo(currentOverlay);
}
updateQmlDisplay(currentOverlay);
if (code == 0x01) {
// Hide/show ruler
m_glMonitor->switchRuler(currentOverlay & 0x01);
}
}
void Monitor::updateMonitorGamma()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment