Commit ffd3b4b4 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/views/App/IncallFullscreen): display correctly timer

parent e60efba8
......@@ -136,12 +136,6 @@ Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) {
}
Camera::~Camera () {
// Reset context in ms filter.
if (m_is_preview)
CoreManager::getInstance()->getCore()->setNativePreviewWindowId(nullptr);
else
m_call->getLinphoneCall()->setNativeVideoWindowId(nullptr);
delete m_context_info;
}
......
......@@ -95,6 +95,35 @@ Window {
}
}
// -----------------------------------------------------------------------
// Timer.
// -----------------------------------------------------------------------
Text {
id: elapsedTime
anchors.fill: parent
font.pointSize: CallStyle.header.elapsedTime.fullscreenFontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
// Not a customizable style.
color: 'white'
style: Text.Raised
styleColor: 'black'
Component.onCompleted: {
var updateDuration = function () {
text = Utils.formatElapsedTime(call.duration)
Utils.setTimeout(elapsedTime, 1000, updateDuration)
}
updateDuration()
}
}
// -----------------------------------------------------------------------
// Video actions.
// -----------------------------------------------------------------------
......@@ -125,24 +154,6 @@ Window {
}
}
Text {
id: elapsedTime
Layout.fillWidth: true
color: CallStyle.header.elapsedTime.color
font.pointSize: CallStyle.header.elapsedTime.fontSize
horizontalAlignment: Text.AlignHCenter
Component.onCompleted: {
var updateDuration = function () {
text = Utils.formatElapsedTime(call.duration)
Utils.setTimeout(elapsedTime, 1000, updateDuration)
}
updateDuration()
}
}
// -------------------------------------------------------------------------
// Action Buttons.
// -------------------------------------------------------------------------
......
......@@ -60,6 +60,7 @@ QtObject {
property QtObject elapsedTime: QtObject {
property color color: Colors.j
property int fontSize: 10
property int fullscreenFontSize: 12
}
}
}
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