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

This commit is contained in:
Ronan Abhamon 2017-02-07 14:38:05 +01:00
parent e60efba868
commit ffd3b4b460
3 changed files with 30 additions and 24 deletions

View file

@ -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;
}

View file

@ -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.
// -------------------------------------------------------------------------

View file

@ -60,6 +60,7 @@ QtObject {
property QtObject elapsedTime: QtObject {
property color color: Colors.j
property int fontSize: 10
property int fullscreenFontSize: 12
}
}
}