Commit 70c26565 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/modules/Linphone/Calls/CallStatistics): better style and reworking

parent 4c9f5807
...@@ -15,7 +15,7 @@ AbstractDropDownMenu { ...@@ -15,7 +15,7 @@ AbstractDropDownMenu {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
function _computeHeight () { function _computeHeight () {
return callStatistics.height return CallStatisticsStyle.height
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -25,14 +25,16 @@ AbstractDropDownMenu { ...@@ -25,14 +25,16 @@ AbstractDropDownMenu {
RowLayout { RowLayout {
spacing: CallStatisticsStyle.spacing spacing: CallStatisticsStyle.spacing
width: parent.width
// --------------------------------------------------------------------------- // -----------------------------------------------------------------------
Text { Text {
Layout.preferredWidth: CallStatisticsStyle.key.width Layout.preferredWidth: CallStatisticsStyle.key.width
color: CallStatisticsStyle.key.color color: CallStatisticsStyle.key.color
elide: Text.ElideRight elide: Text.ElideRight
font { font {
pointSize: CallStatisticsStyle.key.fontSize pointSize: CallStatisticsStyle.key.fontSize
bold: true bold: true
...@@ -44,10 +46,11 @@ AbstractDropDownMenu { ...@@ -44,10 +46,11 @@ AbstractDropDownMenu {
text: modelData.key text: modelData.key
} }
// --------------------------------------------------------------------------- // -----------------------------------------------------------------------
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
color: CallStatisticsStyle.value.color color: CallStatisticsStyle.value.color
elide: Text.ElideRight elide: Text.ElideRight
font.pointSize: CallStatisticsStyle.value.fontSize font.pointSize: CallStatisticsStyle.value.fontSize
...@@ -63,17 +66,20 @@ AbstractDropDownMenu { ...@@ -63,17 +66,20 @@ AbstractDropDownMenu {
id: media id: media
Column { Column {
width: parent.width
Text { Text {
width: parent.width
color: CallStatisticsStyle.title.color color: CallStatisticsStyle.title.color
font { font {
bold: true bold: true
pointSize: CallStatisticsStyle.title.fontSize pointSize: CallStatisticsStyle.title.fontSize
} }
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: $label text: $label
height: contentHeight + CallStatisticsStyle.title.bottomMargin
width: parent.width
} }
Repeater { Repeater {
...@@ -92,6 +98,7 @@ AbstractDropDownMenu { ...@@ -92,6 +98,7 @@ AbstractDropDownMenu {
Row { Row {
anchors { anchors {
fill: parent fill: parent
topMargin: CallStatisticsStyle.topMargin
leftMargin: CallStatisticsStyle.leftMargin leftMargin: CallStatisticsStyle.leftMargin
rightMargin: CallStatisticsStyle.rightMargin rightMargin: CallStatisticsStyle.rightMargin
} }
...@@ -99,6 +106,7 @@ AbstractDropDownMenu { ...@@ -99,6 +106,7 @@ AbstractDropDownMenu {
Loader { Loader {
property string $label: qsTr("audioStatsLabel") property string $label: qsTr("audioStatsLabel")
property var $data: callStatistics.call.audioStats property var $data: callStatistics.call.audioStats
sourceComponent: media sourceComponent: media
width: parent.width / 2 width: parent.width / 2
} }
...@@ -106,6 +114,7 @@ AbstractDropDownMenu { ...@@ -106,6 +114,7 @@ AbstractDropDownMenu {
Loader { Loader {
property string $label: qsTr("videoStatsLabel") property string $label: qsTr("videoStatsLabel")
property var $data: callStatistics.call.videoStats property var $data: callStatistics.call.videoStats
sourceComponent: media sourceComponent: media
width: parent.width / 2 width: parent.width / 2
} }
......
...@@ -7,24 +7,26 @@ import Common 1.0 ...@@ -7,24 +7,26 @@ import Common 1.0
QtObject { QtObject {
property color color: Colors.e property color color: Colors.e
property int height: 60 property int height: 250
property int leftMargin: 12 property int leftMargin: 12
property int rightMargin: 12 property int rightMargin: 12
property int width: 240 property int spacing: 8
property int topMargin: 10
property QtObject title: QtObject { property QtObject title: QtObject {
property color color: Colors.l property color color: Colors.d
property int bottomMargin: 20
property int fontSize: 16 property int fontSize: 16
} }
property QtObject key: QtObject { property QtObject key: QtObject {
property int width: 200 property color color: Colors.d
property color color: Colors.l
property int fontSize: 10 property int fontSize: 10
property int width: 200
} }
property QtObject value: QtObject { property QtObject value: QtObject {
property color color: Colors.l property color color: Colors.d
property int fontSize: 10 property int fontSize: 10
} }
} }
...@@ -87,14 +87,12 @@ Rectangle { ...@@ -87,14 +87,12 @@ Rectangle {
id: callStatistics id: callStatistics
call: incall.call call: incall.call
height: container.height
width: container.width width: container.width
launcher: callQuality launcher: callQuality
relativeTo: callQuality relativeTo: callQuality
relativeY: info.height + elapsedTime.height * 2 relativeY: CallStyle.header.stats.relativeY
} }
} }
......
...@@ -66,5 +66,9 @@ QtObject { ...@@ -66,5 +66,9 @@ QtObject {
property int fontSize: 10 property int fontSize: 10
property int fullscreenFontSize: 12 property int fullscreenFontSize: 12
} }
property QtObject stats: QtObject {
property int relativeY: 90
}
} }
} }
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