mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
fix(ui/views/App/IncallFullscreen): display correctly timer
This commit is contained in:
parent
e60efba868
commit
ffd3b4b460
3 changed files with 30 additions and 24 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue