resize the app according to screen definition

fix ui size according to screen resolution
This commit is contained in:
Gaelle Braud 2025-03-06 11:37:58 +01:00 committed by gaelle.braud
parent c20a54df48
commit 06647f002a
119 changed files with 2162 additions and 2158 deletions

View file

@ -8,10 +8,10 @@ Button {
id: mainItem
textSize: Typography.b1.pixelSize
textWeight: Typography.b1.weight
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 11 * DefaultStyle.dp
bottomPadding: 11 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
}
leftPadding: Math.round(20.04 * DefaultStyle.dp)
rightPadding: Math.round(20.04 * DefaultStyle.dp)
topPadding: Math.round(11.2 * DefaultStyle.dp)
bottomPadding: Math.round(11.2 * DefaultStyle.dp)
icon.width: Math.round(24.89 * DefaultStyle.dp)
icon.height: Math.round(24.89 * DefaultStyle.dp)
}

View file

@ -22,10 +22,10 @@ Control.Button {
property color disabledFilterColor: color.hslLightness > 0.5
? DefaultStyle.grey_0
: DefaultStyle.grey_400
property int textSize: 18 * DefaultStyle.dp
property int textWeight: 600 * DefaultStyle.dp
property real textSize: Math.round(18 * DefaultStyle.dp)
property real textWeight: Typography.b1.weight
property var textHAlignment: Text.AlignHCenter
property int radius: 48 * DefaultStyle.dp
property real radius: Math.round(48 * DefaultStyle.dp)
property bool underline: false
property bool hasNavigationFocus: enabled && (activeFocus || hovered)
property bool shadowEnabled: false
@ -33,7 +33,7 @@ Control.Button {
property var hoveredImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.05)
property var pressedImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.1)
property bool asynchronous: true
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
hoverEnabled: enabled
activeFocusOnTab: true
icon.source: style?.iconSource || ""

View file

@ -14,24 +14,24 @@ ComboBox {
id: contentText
text: Qt.formatDate(calendar.selectedDate, "ddd d, MMMM")
anchors.fill: parent
anchors.leftMargin: 15 * DefaultStyle.dp
anchors.leftMargin: Math.round(15 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
weight: Math.min(Math.round(700 * DefaultStyle.dp), 1000)
}
}
popup: Control.Popup {
id: popupItem
y: mainItem.height
width: 321 * DefaultStyle.dp
height: 270 * DefaultStyle.dp
width: Math.round(321 * DefaultStyle.dp)
height: Math.round(270 * DefaultStyle.dp)
closePolicy: Popup.NoAutoClose
topPadding: 25 * DefaultStyle.dp
bottomPadding: 24 * DefaultStyle.dp
leftPadding: 21 * DefaultStyle.dp
rightPadding: 19 * DefaultStyle.dp
topPadding: Math.round(25 * DefaultStyle.dp)
bottomPadding: Math.round(24 * DefaultStyle.dp)
leftPadding: Math.round(21 * DefaultStyle.dp)
rightPadding: Math.round(19 * DefaultStyle.dp)
onOpened: calendar.forceActiveFocus()
background: Item {
anchors.fill: parent
@ -39,7 +39,7 @@ ComboBox {
id: calendarBg
anchors.fill: parent
color: DefaultStyle.grey_0
radius: 16 * DefaultStyle.dp
radius: Math.round(16 * DefaultStyle.dp)
border.color: DefaultStyle.main1_500_main
border.width: calendar.activeFocus? 1 : 0
}

View file

@ -7,16 +7,16 @@ Control.CheckBox {
id: mainItem
hoverEnabled: enabled
indicator: Item{
implicitWidth: 20 * DefaultStyle.dp
implicitHeight: 20 * DefaultStyle.dp
implicitWidth: Math.round(20 * DefaultStyle.dp)
implicitHeight: Math.round(20 * DefaultStyle.dp)
x: (parent.width - width) / 2
y: (parent.height - height) / 2
Rectangle {
id: backgroundArea
anchors.fill: parent
radius: 3 * DefaultStyle.dp
radius: Math.round(3 * DefaultStyle.dp)
border.color: mainItem.hovered || mainItem.activeFocus ? DefaultStyle.main1_600 : DefaultStyle.main1_500_main
border.width: 2 * DefaultStyle.dp
border.width: Math.round(2 * DefaultStyle.dp)
color: mainItem.checked ? DefaultStyle.main1_500_main : "transparent"
EffectImage {
visible: mainItem.checked

View file

@ -11,9 +11,9 @@ Control.ComboBox {
// readonly property string currentText: selectedItemText.text
property alias listView: listView
property string constantImageSource
property int pixelSize: 14 * DefaultStyle.dp
property int weight: 400 * DefaultStyle.dp
property int leftMargin: 10 * DefaultStyle.dp
property real pixelSize: Typography.p1.pixelSize
property real weight: Typography.p1.weight
property real leftMargin: Math.round(10 * DefaultStyle.dp)
property bool oneLine: false
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
property string flagRole// Specific case if flag is shown (special font)
@ -49,7 +49,7 @@ Control.ComboBox {
Rectangle {
id: buttonBackground
anchors.fill: parent
radius: 63 * DefaultStyle.dp
radius: Math.round(63 * DefaultStyle.dp)
color: mainItem.enabled ? DefaultStyle.grey_100 : DefaultStyle.grey_200
border.color: mainItem.enabled
? mainItem.activeFocus
@ -71,13 +71,13 @@ Control.ComboBox {
}
contentItem: RowLayout {
anchors.fill: parent
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.rightMargin: indicImage.width + 10 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
anchors.rightMargin: indicImage.width + Math.round(10 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
EffectImage {
id: selectedItemImg
Layout.preferredWidth: visible ? 24 * DefaultStyle.dp : 0
Layout.preferredHeight: visible ? 24 * DefaultStyle.dp : 0
Layout.preferredWidth: visible ? Math.round(24 * DefaultStyle.dp) : 0
Layout.preferredHeight: visible ? Math.round(24 * DefaultStyle.dp) : 0
Layout.leftMargin: mainItem.leftMargin
imageSource: mainItem.constantImageSource ? mainItem.constantImageSource : ""
colorizationColor: DefaultStyle.main2_600
@ -87,7 +87,7 @@ Control.ComboBox {
Text {
id: selectedItemFlag
Layout.preferredWidth: implicitWidth
Layout.leftMargin: selectedItemImg.visible ? 0 : 5 * DefaultStyle.dp
Layout.leftMargin: selectedItemImg.visible ? 0 : Math.round(5 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
color: mainItem.enabled ? DefaultStyle.main2_600 : DefaultStyle.grey_400
font {
@ -99,8 +99,8 @@ Control.ComboBox {
Text {
id: selectedItemText
Layout.fillWidth: true
Layout.leftMargin: selectedItemImg.visible ? 0 : 5 * DefaultStyle.dp
Layout.rightMargin: 20 * DefaultStyle.dp
Layout.leftMargin: selectedItemImg.visible ? 0 : Math.round(5 * DefaultStyle.dp)
Layout.rightMargin: Math.round(20 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
color: mainItem.enabled ? DefaultStyle.main2_600 : DefaultStyle.grey_400
elide: Text.ElideRight
@ -119,10 +119,10 @@ Control.ComboBox {
id: indicImage
z: 1
anchors.right: parent.right
anchors.rightMargin: 10 * DefaultStyle.dp
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
imageSource: AppIcons.downArrow
width: 14 * DefaultStyle.dp
width: Math.round(14 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
}
@ -131,7 +131,7 @@ Control.ComboBox {
y: mainItem.height - 1
width: mainItem.width
implicitHeight: Math.min(contentItem.implicitHeight, mainWindow.height)
padding: 1 * DefaultStyle.dp
padding: Math.max(Math.round(1 * DefaultStyle.dp), 1)
//height: Math.min(implicitHeight, 300)
onOpened: {
@ -151,7 +151,7 @@ Control.ComboBox {
highlight: Rectangle {
width: listView.width
color: DefaultStyle.main2_200
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
y: listView.currentItem? listView.currentItem.y : 0
}
@ -172,17 +172,17 @@ Control.ComboBox {
anchors.fill: parent
EffectImage {
id: delegateImg
Layout.preferredWidth: visible ? 20 * DefaultStyle.dp : 0
Layout.leftMargin: 10 * DefaultStyle.dp
Layout.preferredWidth: visible ? Math.round(20 * DefaultStyle.dp) : 0
Layout.leftMargin: Math.round(10 * DefaultStyle.dp)
visible: imageSource != ""
imageWidth: 20 * DefaultStyle.dp
imageWidth: Math.round(20 * DefaultStyle.dp)
imageSource: typeof(modelData) != "undefined" && modelData.img ? modelData.img : ""
fillMode: Image.PreserveAspectFit
}
Text {
Layout.preferredWidth: implicitWidth
Layout.leftMargin: delegateImg.visible ? 0 : 5 * DefaultStyle.dp
Layout.leftMargin: delegateImg.visible ? 0 : Math.round(5 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
visible: mainItem.flagRole
font {
@ -198,8 +198,8 @@ Control.ComboBox {
}
Text {
Layout.fillWidth: true
Layout.leftMargin: delegateImg.visible ? 0 : 5 * DefaultStyle.dp
Layout.rightMargin: 20 * DefaultStyle.dp
Layout.leftMargin: delegateImg.visible ? 0 : Math.round(5 * DefaultStyle.dp)
Layout.rightMargin: Math.round(20 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
text: typeof(modelData) != "undefined"
? mainItem.textRole
@ -217,8 +217,8 @@ Control.ComboBox {
wrapMode: Text.WrapAnywhere
font {
family: DefaultStyle.defaultFont
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
weight: Math.min(Math.round(400 * DefaultStyle.dp), 1000)
}
}
}
@ -230,7 +230,7 @@ Control.ComboBox {
Rectangle {
anchors.fill: parent
opacity: 0.1
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
color: DefaultStyle.main2_500main
visible: parent.containsMouse
}
@ -248,11 +248,11 @@ Control.ComboBox {
background: Item {
implicitWidth: mainItem.width
implicitHeight: 30 * DefaultStyle.dp
implicitHeight: Math.round(30 * DefaultStyle.dp)
Rectangle {
id: cboxBg
anchors.fill: parent
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
}
MultiEffect {
anchors.fill: cboxBg

View file

@ -17,8 +17,8 @@ ColumnLayout {
text: mainItem.label
color: combobox.activeFocus ? DefaultStyle.main1_500_main : DefaultStyle.main2_600
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2.pixelSize
weight: Typography.p2.weight
bold: true
}
}
@ -32,7 +32,7 @@ ColumnLayout {
background: Rectangle {
implicitWidth: mainItem.implicitWidth
implicitHeight: mainItem.implicitHeight
radius: 63 * DefaultStyle.dp
radius: Math.round(63 * DefaultStyle.dp)
color: mainItem.enableBackgroundColor ? DefaultStyle.grey_100 : "transparent"
border.color: mainItem.enableBackgroundColors
? (mainItem.errorMessage.length > 0
@ -45,14 +45,14 @@ ColumnLayout {
contentItem: Item {
anchors.fill: parent
readonly property var currentItem: combobox.model.getAt(combobox.currentIndex)
anchors.leftMargin: 15 * DefaultStyle.dp
anchors.leftMargin: Math.round(15 * DefaultStyle.dp)
Text {
id: selectedItemFlag
visible: text.length > 0
font.pixelSize: 21 * DefaultStyle.dp
font.pixelSize: Math.round(21 * DefaultStyle.dp)
text: parent.currentItem ? parent.currentItem.flag : ""
font.family: DefaultStyle.flagFont
anchors.rightMargin: 5 * DefaultStyle.dp
anchors.rightMargin: Math.round(5 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
}
// Rectangle{
@ -60,7 +60,7 @@ ColumnLayout {
// visible: false
// layer.enabled: true
// anchors.centerIn: selectedItemFlag
// radius: 600 * DefaultStyle.dp
// radius: Math.round(600 * DefaultStyle.dp)
// width: selectedItemFlag.width/2
// height: selectedItemFlag.height/2
// }
@ -75,7 +75,7 @@ ColumnLayout {
// maskSource: mask
// }
Text {
leftPadding: 5 * DefaultStyle.dp
leftPadding: Math.round(5 * DefaultStyle.dp)
text: parent.currentItem ? "+" + parent.currentItem.countryCallingCode : ""
color: DefaultStyle.main2_600
anchors.right: parent.right
@ -83,8 +83,8 @@ ColumnLayout {
anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
}
@ -99,8 +99,8 @@ ColumnLayout {
popup: Control.Popup {
id: listPopup
y: combobox.height - 1
width: 311 * DefaultStyle.dp
height: 250 * DefaultStyle.dp
width: Math.round(311 * DefaultStyle.dp)
height: Math.round(250 * DefaultStyle.dp)
contentItem: ListView {
id: listView
@ -111,14 +111,14 @@ ColumnLayout {
keyNavigationEnabled: true
keyNavigationWraps: true
maximumFlickVelocity: 1500
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
highlight: Rectangle {
anchors.left: parent.left
anchors.right: parent.right
width: listView.width
height: listView.height
color: DefaultStyle.main2_300
// radius: 15 * DefaultStyle.dp
// radius: Math.round(15 * DefaultStyle.dp)
}
delegate: Item {
@ -127,7 +127,7 @@ ColumnLayout {
RowLayout {
id: contentLayout
anchors.fill: parent
anchors.leftMargin: 20 * DefaultStyle.dp
anchors.leftMargin: Math.round(20 * DefaultStyle.dp)
spacing: 0
Text {
@ -135,7 +135,7 @@ ColumnLayout {
visible: text.length > 0
text: $modelData.flag
font {
pixelSize: 28 * DefaultStyle.dp
pixelSize: Math.round(28 * DefaultStyle.dp)
family: DefaultStyle.flagFont
}
}
@ -146,14 +146,14 @@ ColumnLayout {
elide: Text.ElideRight
color: DefaultStyle.main2_500main
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
Rectangle {
id: separator
width: 1 * DefaultStyle.dp
width: Math.max(Math.round(1 * DefaultStyle.dp), 1)
height: combobox.height / 2
color: DefaultStyle.main2_500main
}
@ -163,8 +163,8 @@ ColumnLayout {
elide: Text.ElideRight
color: DefaultStyle.main2_500main
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
Item {
@ -177,7 +177,7 @@ ColumnLayout {
Rectangle {
anchors.fill: parent
opacity: 0.1
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
color: DefaultStyle.main2_500main
visible: parent.containsMouse
}
@ -199,7 +199,7 @@ ColumnLayout {
Rectangle {
id: popupBg
anchors.fill: parent
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
color: DefaultStyle.grey_100
}
MultiEffect {

View file

@ -8,7 +8,7 @@ MouseArea {
property string iconSource
property string title
property string subTitle
property int iconSize: 32 * DefaultStyle.dp
property real iconSize: (32 * DefaultStyle.dp)
property bool shadowEnabled: containsMouse || activeFocus
hoverEnabled: true
width: content.implicitWidth
@ -36,7 +36,7 @@ MouseArea {
ColumnLayout {
width: implicitWidth
height: implicitHeight
Layout.leftMargin: 16 * DefaultStyle.dp
Layout.leftMargin: (16 * DefaultStyle.dp)
Text {
Layout.fillWidth: true
text: mainItem.title

View file

@ -6,11 +6,11 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
Button {
id: mainItem
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
textSize: 14 * DefaultStyle.dp
textWeight: 400 * DefaultStyle.dp
radius: 5 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
textSize: Typography.p1.pixelSize
textWeight: Typography.p1.weight
radius: Math.round(5 * DefaultStyle.dp)
shadowEnabled: mainItem.activeFocus || hovered
style: ButtonStyle.hoveredBackground

View file

@ -6,16 +6,16 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
Button {
id: mainItem
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
textSize: 14 * DefaultStyle.dp
textWeight: 400 * DefaultStyle.dp
radius: 5 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
textSize: Typography.p1.pixelSize
textWeight: Typography.p1.weight
radius: Math.round(5 * DefaultStyle.dp)
shadowEnabled: mainItem.activeFocus || hovered
style: ButtonStyle.hoveredBackground
contentItem: RowLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
EffectImage {
imageSource: mainItem.icon.source
imageWidth: mainItem.icon.width

View file

@ -8,10 +8,10 @@ Button {
id: mainItem
textSize: Typography.b2.pixelSize
textWeight: Typography.b2.weight
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
topPadding: 10 * DefaultStyle.dp
bottomPadding: 10 * DefaultStyle.dp
icon.width: 16 * DefaultStyle.dp
icon.height: 16 * DefaultStyle.dp
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
topPadding: Math.round(10 * DefaultStyle.dp)
bottomPadding: Math.round(10 * DefaultStyle.dp)
icon.width: Math.round(16 * DefaultStyle.dp)
icon.height: Math.round(16 * DefaultStyle.dp)
}

View file

@ -12,17 +12,17 @@ Button {
property color backgroundColor: checked ? pressedColor : hovered ? hoveredColor : color
style: ButtonStyle.popupButton
checked: popup.visible
implicitWidth: 24 * DefaultStyle.dp
implicitHeight: 24 * DefaultStyle.dp
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
implicitWidth: Math.round(24 * DefaultStyle.dp)
implicitHeight: Math.round(24 * DefaultStyle.dp)
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
icon.source: AppIcons.verticalDots
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
function close() {
popup.close()
}
@ -97,7 +97,7 @@ Button {
id: buttonBackground
anchors.fill: parent
color: mainItem.backgroundColor
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
}
MultiEffect {
enabled: mainItem.shadowEnabled
@ -130,7 +130,7 @@ Button {
visible: false
closePolicy: Popup.CloseOnPressOutsideParent | Popup.CloseOnPressOutside
| Popup.CloseOnEscape
padding: 10 * DefaultStyle.dp
padding: Math.round(10 * DefaultStyle.dp)
parent: mainItem // Explicit define for coordinates references.
function updatePosition() {
if (!visible)
@ -177,7 +177,7 @@ Button {
id: popupBackground
anchors.fill: parent
color: DefaultStyle.grey_0
radius: 16 * DefaultStyle.dp
radius: Math.round(16 * DefaultStyle.dp)
}
MultiEffect {
source: popupBackground

View file

@ -11,7 +11,7 @@ Control.RadioButton {
property string imgUrl
property bool checkOnClick: true
property color color
property int indicatorSize: 16 * DefaultStyle.dp
property real indicatorSize: Math.round(16 * DefaultStyle.dp)
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
//onClicked: if (checkOnClick && !mainItem.checked) mainItem.toggle()
@ -33,7 +33,7 @@ Control.RadioButton {
radius: mainItem.indicatorSize/2
color: "transparent"
border.color: mainItem.color
border.width: 2 * DefaultStyle.dp
border.width: Math.round(2 * DefaultStyle.dp)
Rectangle {
width: parent.width/2
height: parent.height/2

View file

@ -8,13 +8,13 @@ Button {
id: mainItem
textSize: Typography.p1s.pixelSize
textWeight: Typography.p1s.weight
topPadding: 16 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
radius: 40 * DefaultStyle.dp
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
}
topPadding: Math.round(16 * DefaultStyle.dp)
bottomPadding: Math.round(16 * DefaultStyle.dp)
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
radius: Math.round(40 * DefaultStyle.dp)
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
}

View file

@ -21,18 +21,18 @@ Control.RadioButton {
background: Rectangle {
color: DefaultStyle.grey_100
border.color: mainItem.checked ? mainItem.color : "transparent"
radius: 20 * DefaultStyle.dp
radius: Math.round(20 * DefaultStyle.dp)
}
indicator: RowLayout {
anchors.left: parent.left
anchors.leftMargin: 13 * DefaultStyle.dp
anchors.leftMargin: Math.round(13 * DefaultStyle.dp)
anchors.top: parent.top
anchors.topMargin: 8 * DefaultStyle.dp
spacing: 4 * DefaultStyle.dp
anchors.topMargin: Math.round(8 * DefaultStyle.dp)
spacing: Math.round(4 * DefaultStyle.dp)
Rectangle {
implicitWidth: 16 * DefaultStyle.dp
implicitHeight: 16 * DefaultStyle.dp
implicitWidth: Math.round(16 * DefaultStyle.dp)
implicitHeight: Math.round(16 * DefaultStyle.dp)
radius: implicitWidth/2
border.color: mainItem.color
@ -51,7 +51,7 @@ Control.RadioButton {
text: mainItem.title
font.bold: true
color: DefaultStyle.grey_900
font.pixelSize: 16 * DefaultStyle.dp
font.pixelSize: Math.round(16 * DefaultStyle.dp)
}
Button {
padding: 0
@ -59,12 +59,12 @@ Control.RadioButton {
visible: false
}
icon.source: AppIcons.info
Layout.preferredWidth: 2 * DefaultStyle.dp
Layout.preferredHeight: 2 * DefaultStyle.dp
width: 2 * DefaultStyle.dp
height: 2 * DefaultStyle.dp
icon.width: 2 * DefaultStyle.dp
icon.height: 2 * DefaultStyle.dp
Layout.preferredWidth: Math.round(2 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(2 * DefaultStyle.dp)
width: Math.round(2 * DefaultStyle.dp)
height: Math.round(2 * DefaultStyle.dp)
icon.width: Math.round(2 * DefaultStyle.dp)
icon.height: Math.round(2 * DefaultStyle.dp)
}
}
@ -73,27 +73,27 @@ Control.RadioButton {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 13 * DefaultStyle.dp
anchors.leftMargin: Math.round(13 * DefaultStyle.dp)
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.bottomMargin: 10 * DefaultStyle.dp
Layout.rightMargin: 10 * DefaultStyle.dp
Layout.bottomMargin: Math.round(10 * DefaultStyle.dp)
Layout.rightMargin: Math.round(10 * DefaultStyle.dp)
Layout.alignment: Qt.AlignVCenter
Text {
id: innerText
verticalAlignment: Text.AlignVCenter
Layout.preferredWidth: 220 * DefaultStyle.dp
Layout.preferredHeight: 100 * DefaultStyle.dp
font.pixelSize: 14 * DefaultStyle.dp
Layout.preferredWidth: Math.round(220 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(100 * DefaultStyle.dp)
font.pixelSize: Math.round(14 * DefaultStyle.dp)
text: mainItem.contentText
Layout.fillHeight: true
}
Image {
id: image
Layout.fillHeight: true
Layout.preferredWidth: 100 * DefaultStyle.dp
Layout.preferredHeight: 100 * DefaultStyle.dp
Layout.preferredWidth: Math.round(100 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(100 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
source: mainItem.imgUrl
}

View file

@ -6,7 +6,7 @@ import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
ComboBox {
id: mainItem
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
property string propertyName
property var propertyOwner

View file

@ -11,7 +11,7 @@ RowLayout {
property var propertyOwner
property var propertyOwnerGui
property bool enabled: true
spacing : 20 * DefaultStyle.dp
spacing : Math.round(20 * DefaultStyle.dp)
signal checkedChanged(bool checked)
function setChecked(value) {
@ -19,8 +19,8 @@ RowLayout {
}
ColumnLayout {
Layout.minimumHeight: 32 * DefaultStyle.dp
spacing: 4 * DefaultStyle.dp
Layout.minimumHeight: Math.round(32 * DefaultStyle.dp)
spacing: Math.round(4 * DefaultStyle.dp)
Text {
text: titleText
font: Typography.p2l

View file

@ -11,14 +11,14 @@ Control.Slider {
background: Item{
x: mainItem.leftPadding
y: mainItem.topPadding + mainItem.availableHeight / 2 - height / 2
implicitWidth: 200 * DefaultStyle.dp
implicitHeight: 4 * DefaultStyle.dp
implicitWidth: Math.round(200 * DefaultStyle.dp)
implicitHeight: Math.round(4 * DefaultStyle.dp)
width: mainItem.availableWidth
height: implicitHeight
Rectangle {
id: sliderBackground
anchors.fill: parent
radius: 30 * DefaultStyle.dp
radius: Math.round(30 * DefaultStyle.dp)
// TODO : change the colors when mockup indicates their names
color: DefaultStyle.grey_850
@ -30,7 +30,7 @@ Control.Slider {
GradientStop { position: 0.0; color: "#FF9E79" }
GradientStop { position: 1.0; color: "#FE5E00" }
}
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
}
}
MultiEffect {
@ -49,12 +49,12 @@ Control.Slider {
handle: Item {
x: mainItem.leftPadding + mainItem.visualPosition * (mainItem.availableWidth - width)
y: mainItem.topPadding + mainItem.availableHeight / 2 - height / 2
implicitWidth: 16 * DefaultStyle.dp
implicitHeight: 16 * DefaultStyle.dp
implicitWidth: Math.round(16 * DefaultStyle.dp)
implicitHeight: Math.round(16 * DefaultStyle.dp)
Rectangle {
id: handleRect
anchors.fill: parent
radius: 30 * DefaultStyle.dp
radius: Math.round(30 * DefaultStyle.dp)
color: DefaultStyle.grey_0
}
MultiEffect {

View file

@ -8,10 +8,10 @@ Button {
id: mainItem
textSize: Typography.b3.pixelSize
textWeight: Typography.b3.weight
leftPadding: 12 * DefaultStyle.dp
rightPadding: 12 * DefaultStyle.dp
topPadding: 6 * DefaultStyle.dp
bottomPadding: 6 * DefaultStyle.dp
icon.height: 14 * DefaultStyle.dp
icon.width: 14 * DefaultStyle.dp
leftPadding: Math.round(12 * DefaultStyle.dp)
rightPadding: Math.round(12 * DefaultStyle.dp)
topPadding: Math.round(6 * DefaultStyle.dp)
bottomPadding: Math.round(6 * DefaultStyle.dp)
icon.height: Math.round(14 * DefaultStyle.dp)
icon.width: Math.round(14 * DefaultStyle.dp)
}

View file

@ -9,27 +9,27 @@ Control.Switch {
property bool shadowEnabled: mainItem.hovered || mainItem.activeFocus
hoverEnabled: true
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
indicator: Item{
implicitWidth: 32 * DefaultStyle.dp
implicitHeight: 20 * DefaultStyle.dp
implicitWidth: Math.round(32 * DefaultStyle.dp)
implicitHeight: Math.round(20 * DefaultStyle.dp)
x: mainItem.leftPadding
y: parent.height / 2 - height / 2
Rectangle {
id: indicatorBackground
anchors.fill: parent
radius: 10 * DefaultStyle.dp
radius: Math.round(10 * DefaultStyle.dp)
color: mainItem.checked? DefaultStyle.success_500main : DefaultStyle.main2_400
Rectangle {
anchors.verticalCenter: parent.verticalCenter
property int margin: 4 * DefaultStyle.dp
property real margin: Math.round(4 * DefaultStyle.dp)
x: mainItem.checked ? parent.width - width - margin : margin
width: 12 * DefaultStyle.dp
height: 12 * DefaultStyle.dp
radius: 10 * DefaultStyle.dp
width: Math.round(12 * DefaultStyle.dp)
height: Math.round(12 * DefaultStyle.dp)
radius: Math.round(10 * DefaultStyle.dp)
color: DefaultStyle.grey_0
Behavior on x {
NumberAnimation{duration: 100}

View file

@ -33,8 +33,8 @@ Item {
RowLayout{
anchors.fill: parent
anchors.rightMargin: 10 * DefaultStyle.dp
spacing: 16 * DefaultStyle.dp
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
spacing: Math.round(16 * DefaultStyle.dp)
Sticker {
id: activeSpeakerSticker
Layout.fillWidth: true
@ -58,23 +58,23 @@ Item {
ListView{
id: sideStickers
Layout.fillHeight: true
Layout.preferredWidth: 300 * DefaultStyle.dp
Layout.rightMargin: 10 * DefaultStyle.dp
Layout.bottomMargin: 10 * DefaultStyle.dp
Layout.preferredWidth: Math.round(300 * DefaultStyle.dp)
Layout.rightMargin: Math.round(10 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(10 * DefaultStyle.dp)
visible: allDevices.count > 2 || !!mainItem.conference?.core.isScreenSharingEnabled
//spacing: 15 * DefaultStyle.dp // bugged? First item has twice margins
//spacing: Math.round(15 * DefaultStyle.dp) // bugged? First item has twice margins
model: allDevices
snapMode: ListView.SnapOneItem
clip: true
delegate: Item{ // Spacing workaround
visible: $modelData && mainItem.callState != LinphoneEnums.CallState.End && mainItem.callState != LinphoneEnums.CallState.Released
&& ($modelData.core.address != activeSpeakerAddress || mainItem.conference?.core.isScreenSharingEnabled) || false
height: visible ? (180 + 15) * DefaultStyle.dp : 0
width: 300 * DefaultStyle.dp
height: visible ? Math.round((180 + 15) * DefaultStyle.dp) : 0
width: Math.round(300 * DefaultStyle.dp)
Sticker {
previewEnabled: index == 0 // before anchors for priority initialization
anchors.fill: parent
anchors.bottomMargin: 15 * DefaultStyle.dp// Spacing
anchors.bottomMargin: Math.round(15 * DefaultStyle.dp)// Spacing
qmlName: 'S_'+index
visible: parent.visible
participantDevice: $modelData
@ -91,12 +91,12 @@ Item {
previewEnabled: true
visible: !sideStickers.visible
onVisibleChanged: console.log(visible + " : " +allDevices.count)
height: 180 * DefaultStyle.dp
width: 300 * DefaultStyle.dp
height: Math.round(180 * DefaultStyle.dp)
width: Math.round(300 * DefaultStyle.dp)
anchors.right: mainItem.right
anchors.bottom: mainItem.bottom
anchors.rightMargin: 20 * DefaultStyle.dp
anchors.bottomMargin: 10 * DefaultStyle.dp
anchors.rightMargin: Math.round(20 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(10 * DefaultStyle.dp)
videoEnabled: preview.visible && mainItem.call && mainItem.call.core.localVideoEnabled
onVideoEnabledChanged: console.log("P : " +videoEnabled + " / " +visible +" / " +mainItem.call)
property var accountObj: UtilsCpp.findLocalAccountByAddress(mainItem.localAddress)
@ -109,7 +109,7 @@ Item {
id: previewMouseArea
anchors.fill: parent
movableArea: mainItem
margin: 10 * DefaultStyle.dp
margin: Math.round(10 * DefaultStyle.dp)
function resetPosition(){
preview.anchors.right = mainItem.right
preview.anchors.bottom = mainItem.bottom
@ -127,4 +127,4 @@ Item {
onRequestResetPosition: resetPosition()
}
}
}
}

View file

@ -36,8 +36,8 @@ Mosaic {
if(index < 0) cameraView.enabled = false // this is a delegate destruction. We need to stop camera before Qt change its currentDevice (and then, let CameraView to delete wrong renderer)
}
height: grid.cellHeight - 10 * DefaultStyle.dp
width: grid.cellWidth - 10 * DefaultStyle.dp
height: grid.cellHeight - Math.round(10 * DefaultStyle.dp)
width: grid.cellWidth - Math.round(10 * DefaultStyle.dp)
Sticker {
id: cameraView
previewEnabled: index == 0

View file

@ -9,7 +9,7 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
ColumnLayout {
id: mainItem
spacing: 30 * DefaultStyle.dp
spacing: Math.round(30 * DefaultStyle.dp)
property var callHistoryGui
@ -37,41 +37,41 @@ ColumnLayout {
// property alias image: buttonImg
property alias button: button
property string label
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
Button {
id: button
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 56 * DefaultStyle.dp
Layout.preferredHeight: 56 * DefaultStyle.dp
topPadding: 16 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
Layout.preferredWidth: Math.round(56 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(56 * DefaultStyle.dp)
topPadding: Math.round(16 * DefaultStyle.dp)
bottomPadding: Math.round(16 * DefaultStyle.dp)
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
contentImageColor: DefaultStyle.main2_600
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
style: ButtonStyle.grey
}
Text {
Layout.alignment: Qt.AlignHCenter
text: labelButton.label
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
}
ColumnLayout {
spacing: 13 * DefaultStyle.dp
spacing: Math.round(13 * DefaultStyle.dp)
Item {
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
Layout.preferredHeight: detailAvatar.height
Layout.alignment: Qt.AlignHCenter
Avatar {
id: detailAvatar
anchors.horizontalCenter: parent.horizontalCenter
width: 100 * DefaultStyle.dp
height: 100 * DefaultStyle.dp
width: Math.round(100 * DefaultStyle.dp)
height: Math.round(100 * DefaultStyle.dp)
contact: mainItem.contact || null
isConference: !!mainItem.conferenceInfo
displayNameVal: mainItem.contactName
@ -81,18 +81,18 @@ ColumnLayout {
id: rightButton
anchors.right: parent.right
anchors.verticalCenter: detailAvatar.verticalCenter
anchors.rightMargin: 20 * DefaultStyle.dp
width: 30 * DefaultStyle.dp
height: 30 * DefaultStyle.dp
anchors.rightMargin: Math.round(20 * DefaultStyle.dp)
width: Math.round(30 * DefaultStyle.dp)
height: Math.round(30 * DefaultStyle.dp)
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 360 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
ColumnLayout {
spacing: 2 * DefaultStyle.dp
spacing: Math.round(2 * DefaultStyle.dp)
Text {
Layout.preferredWidth: implicitWidth
Layout.alignment: Qt.AlignHCenter
@ -101,8 +101,8 @@ ColumnLayout {
text: detailAvatar.displayNameVal
maximumLineCount: 1
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
capitalization: Font.Capitalize
}
}
@ -115,8 +115,8 @@ ColumnLayout {
elide: Text.ElideMiddle
maximumLineCount: 1
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
@ -141,15 +141,15 @@ ColumnLayout {
? DefaultStyle.danger_500main
: DefaultStyle.main2_500main
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 72 * DefaultStyle.dp
spacing: Math.round(72 * DefaultStyle.dp)
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
MediumButton {
@ -167,10 +167,10 @@ ColumnLayout {
}
LabelButton {
visible: !mainItem.isConference
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
width: Math.round(56 * DefaultStyle.dp)
height: Math.round(56 * DefaultStyle.dp)
button.icon.width: Math.round(24 * DefaultStyle.dp)
button.icon.height: Math.round(24 * DefaultStyle.dp)
button.icon.source: AppIcons.phone
label: qsTr("Appel")
button.onClicked: {
@ -180,20 +180,20 @@ ColumnLayout {
}
LabelButton {
visible: !mainItem.isConference && !SettingsCpp.disableChatFeature
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
width: Math.round(56 * DefaultStyle.dp)
height: Math.round(56 * DefaultStyle.dp)
button.icon.width: Math.round(24 * DefaultStyle.dp)
button.icon.height: Math.round(24 * DefaultStyle.dp)
button.icon.source: AppIcons.chatTeardropText
label: qsTr("Message")
button.onClicked: console.debug("[ContactLayout.qml] TODO : open conversation")
}
LabelButton {
visible: !mainItem.isConference && SettingsCpp.videoEnabled
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
width: Math.round(56 * DefaultStyle.dp)
height: Math.round(56 * DefaultStyle.dp)
button.icon.width: Math.round(24 * DefaultStyle.dp)
button.icon.height: Math.round(24 * DefaultStyle.dp)
button.icon.source: AppIcons.videoCamera
label: qsTr("Appel Video")
button.onClicked: {
@ -208,6 +208,6 @@ ColumnLayout {
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 30 * DefaultStyle.dp
Layout.topMargin: Math.round(30 * DefaultStyle.dp)
}
}

View file

@ -49,7 +49,7 @@ Item {
id: callTerminatedText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 25 * DefaultStyle.dp
anchors.topMargin: Math.round(25 * DefaultStyle.dp)
z: 1
visible: mainItem.callState === LinphoneEnums.CallState.End || mainItem.callState === LinphoneEnums.CallState.Error || mainItem.callState === LinphoneEnums.CallState.Released
text: mainItem.conference
@ -61,8 +61,8 @@ Item {
: call && call.core.lastErrorMessage || ""
color: DefaultStyle.grey_0
font {
pixelSize: 22 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(22 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
@ -78,21 +78,21 @@ Item {
id: waitingForOthersComponent
Rectangle {
color: DefaultStyle.grey_600
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
ColumnLayout {
anchors.centerIn: parent
spacing: 22 * DefaultStyle.dp
spacing: Math.round(22 * DefaultStyle.dp)
width: waitText.implicitWidth
Text {
id: waitText
text: qsTr("Waiting for other participants...")
Layout.preferredHeight: 67 * DefaultStyle.dp
Layout.preferredHeight: Math.round(67 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
color: DefaultStyle.grey_0
font {
pixelSize: 30 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(30 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
Item {
@ -141,16 +141,16 @@ Item {
// text: qsTr("Waiting for other participants...")
// color: DefaultStyle.frey_0
// font {
// pixelSize: 30 * DefaultStyle.dp
// weight: 300 * DefaultStyle.dp
// pixelSize: Math.round(30 * DefaultStyle.dp)
// weight: Math.round(300 * DefaultStyle.dp)
// }
// }
// Button {
// text: qsTr("Share invitation")
// icon.source: AppIcons.shareNetwork
// color: DefaultStyle.main2_400
// Layout.preferredWidth: 206 * DefaultStyle.dp
// Layout.preferredHeight: 47 * DefaultStyle.dp
// Layout.preferredWidth: Math.round(206 * DefaultStyle.dp)
// Layout.preferredHeight: Math.round(47 * DefaultStyle.dp)
// }
// }

View file

@ -57,7 +57,7 @@ ColumnLayout{
GridView{
id: grid
property int margin: 10 * DefaultStyle.dp
property real margin: Math.round(10 * DefaultStyle.dp)
property int itemCount: model.count ? model.count :( model.length ? model.length : 0)
property int columns: 1
property int rows: 1
@ -95,8 +95,8 @@ ColumnLayout{
cellHeight = Math.min(computedWidth, computedHeight)
}
onItemCountChanged: updateLayout()
property int computedWidth: (mainLayout.width - grid.margin ) / columns
property int computedHeight: (mainLayout.height - grid.margin ) / rows
property real computedWidth: (mainLayout.width - grid.margin ) / columns
property real computedHeight: (mainLayout.height - grid.margin ) / rows
onComputedHeightChanged: Qt.callLater(updateCells)
onComputedWidthChanged: Qt.callLater(updateCells)
cellWidth: Math.min(computedWidth, computedHeight)

View file

@ -12,7 +12,7 @@ ColumnLayout {
required property int itemsCount
property int currentIndex: carouselStackLayout.currentIndex
property var currentItem: carouselButton.itemAt(currentIndex)
spacing: 61 * DefaultStyle.dp
spacing: Math.round(61 * DefaultStyle.dp)
function goToSlide(index) {
carouselStackLayout.goToSlideAtIndex(index)
@ -67,9 +67,9 @@ ColumnLayout {
Item {
Rectangle {
id: currentIndicator
width: 13 * DefaultStyle.dp
height: 8 * DefaultStyle.dp
radius: 30 * DefaultStyle.dp
width: Math.round(13 * DefaultStyle.dp)
height: Math.round(8 * DefaultStyle.dp)
radius: Math.round(30 * DefaultStyle.dp)
color: DefaultStyle.main1_500_main
z: 1
x: mainItem.currentIndex >= 0 && mainItem.currentItem ? mainItem.currentItem.x - width/2 + mainItem.currentItem.width/2 : 0
@ -77,21 +77,21 @@ ColumnLayout {
}
RowLayout {
id: carouselButtonsLayout
spacing: 7.5 * DefaultStyle.dp
anchors.leftMargin: 2.5 * DefaultStyle.dp
spacing: Math.round(7.5 * DefaultStyle.dp)
anchors.leftMargin: Math.round(2.5 * DefaultStyle.dp)
Repeater {
id: carouselButton
model: mainItem.itemsCount
delegate: Button {
Layout.preferredWidth: 8 * DefaultStyle.dp
Layout.preferredHeight: 8 * DefaultStyle.dp
Layout.preferredWidth: Math.round(8 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(8 * DefaultStyle.dp)
topPadding: 0
bottomPadding: 0
leftPadding: 0
rightPadding: 0
background: Rectangle {
color: DefaultStyle.main2_200
radius: 30 * DefaultStyle.dp
radius: Math.round(30 * DefaultStyle.dp)
anchors.fill: parent
}
onClicked: {

View file

@ -9,7 +9,7 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
ColumnLayout {
id: mainItem
spacing: 30 * DefaultStyle.dp
spacing: Math.round(30 * DefaultStyle.dp)
property FriendGui contact
@ -17,31 +17,31 @@ ColumnLayout {
property alias content: detailLayout.data
property alias bannerContent: bannerLayout.data
property alias secondLineContent: verticalLayoutSecondLine.data
property int minimumWidthForSwitchintToRowLayout: 756 * DefaultStyle.dp
property var useVerticalLayout: width < minimumWidthForSwitchintToRowLayout * DefaultStyle.dp
property real minimumWidthForSwitchintToRowLayout: Math.round(756 * DefaultStyle.dp)
property var useVerticalLayout: width < minimumWidthForSwitchintToRowMath.round(Layout * DefaultStyle.dp)
GridLayout {
Layout.leftMargin: 64 * DefaultStyle.dp
Layout.rightMargin: 64 * DefaultStyle.dp
Layout.topMargin: 56 * DefaultStyle.dp
Layout.leftMargin: Math.round(64 * DefaultStyle.dp)
Layout.rightMargin: Math.round(64 * DefaultStyle.dp)
Layout.topMargin: Math.round(56 * DefaultStyle.dp)
Layout.fillWidth: true
columns: mainItem.useVerticalLayout ? 1 : children.length
rows: 1
columnSpacing: 49 * DefaultStyle.dp
rowSpacing: 27 * DefaultStyle.dp
columnSpacing: Math.round(49 * DefaultStyle.dp)
rowSpacing: Math.round(27 * DefaultStyle.dp)
RowLayout {
Layout.preferredWidth: 341 * DefaultStyle.dp
Layout.preferredWidth: Math.round(341 * DefaultStyle.dp)
Control.Control {
// Layout.preferredWidth: 734 * DefaultStyle.dp
// Layout.preferredWidth: Math.round(734 * DefaultStyle.dp)
Layout.fillWidth: true
width: 734 * DefaultStyle.dp
height: 100 * DefaultStyle.dp
rightPadding: 21 * DefaultStyle.dp
width: Math.round(734 * DefaultStyle.dp)
height: Math.round(100 * DefaultStyle.dp)
rightPadding: Math.round(21 * DefaultStyle.dp)
background: GradientRectangle {
anchors.fill: parent
anchors.leftMargin: avatar.width / 2
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
borderGradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: DefaultStyle.grey_100 }
@ -55,12 +55,12 @@ ColumnLayout {
}
contentItem: RowLayout {
id: bannerLayout
spacing: 32 * DefaultStyle.dp
spacing: Math.round(32 * DefaultStyle.dp)
Avatar {
id: avatar
contact: mainItem.contact
Layout.preferredWidth: 100 * DefaultStyle.dp
Layout.preferredHeight: 100 * DefaultStyle.dp
Layout.preferredWidth: Math.round(100 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(100 * DefaultStyle.dp)
}
}
}
@ -81,10 +81,10 @@ ColumnLayout {
StackLayout {
id: detailLayout
Layout.alignment: Qt.AlignCenter
Layout.topMargin: mainItem.useVerticalLayout ? 0 : 30 * DefaultStyle.dp
Layout.leftMargin: 64 * DefaultStyle.dp
Layout.rightMargin: 64 * DefaultStyle.dp
Layout.bottomMargin: 53 * DefaultStyle.dp
Layout.topMargin: mainItem.useVerticalLayout ? 0 : Math.round(30 * DefaultStyle.dp)
Layout.leftMargin: Math.round(64 * DefaultStyle.dp)
Layout.rightMargin: Math.round(64 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(53 * DefaultStyle.dp)
Layout.fillWidth: true
Layout.fillHeight: true
}

View file

@ -35,7 +35,7 @@ FocusScope{
ColumnLayout {
id: layout
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
anchors.left: parent.left
anchors.right: parent.right
@ -50,8 +50,8 @@ FocusScope{
textFormat: Text.RichText
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2.pixelSize
weight: Typography.p2.weight
}
}

View file

@ -15,7 +15,7 @@ ColumnLayout {
Rectangle {
id: rightPanelHeader
color: DefaultStyle.grey_0
Layout.preferredHeight: 57 * DefaultStyle.dp
Layout.preferredHeight: Math.round(57 * DefaultStyle.dp)
Layout.fillWidth: true
z: 1
}

View file

@ -9,8 +9,8 @@ Control.ScrollBar {
padding: 0
property color color: DefaultStyle.grey_850
contentItem: Rectangle {
implicitWidth: 6 * DefaultStyle.dp
radius: 32 * DefaultStyle.dp
implicitWidth: Math.round(6 * DefaultStyle.dp)
radius: Math.round(32 * DefaultStyle.dp)
color: mainItem.color
}
}

View file

@ -7,23 +7,23 @@ Layout with line separator used in several views
*/
ColumnLayout {
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
property alias content: contentLayout.data
property alias contentLayout: contentLayout
implicitHeight: contentLayout.implicitHeight + 1 * DefaultStyle.dp + spacing
implicitHeight: contentLayout.implicitHeight + Math.max(Math.round(1 * DefaultStyle.dp), 1) + spacing
ColumnLayout {
id: contentLayout
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
// width: parent.width
// Layout.fillWidth: true
// Layout.preferredHeight: childrenRect.height
// Layout.preferredWidth: parent.width
// Layout.leftMargin: 8 * DefaultStyle.dp
// Layout.leftMargin: Math.round(8 * DefaultStyle.dp)
}
Rectangle {
color: DefaultStyle.main2_200
Layout.fillWidth: true
Layout.preferredHeight: 1 * DefaultStyle.dp
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
width: parent.width
}
}
}

View file

@ -10,9 +10,9 @@ Control.TabBar {
readonly property int originX: count > 0
? itemAt(0).x
: 0
spacing: 40 * DefaultStyle.dp
property int pixelSize: 22 * DefaultStyle.dp
property int textWeight: 800 * DefaultStyle.dp
spacing: Math.round(40 * DefaultStyle.dp)
property real pixelSize: Typography.h3.pixelSize
property real textWeight: Typography.h3.weight
wheelEnabled: true
background: Item {
id: tabBarBackground
@ -20,7 +20,7 @@ Control.TabBar {
Rectangle {
id: barBG
height: 4 * DefaultStyle.dp
height: Math.round(4 * DefaultStyle.dp)
color: DefaultStyle.grey_200
anchors.bottom: parent.bottom
width: parent.width
@ -64,7 +64,7 @@ Control.TabBar {
Rectangle {
id: tabBackground
visible: mainItem.currentIndex === index
height: 5 * DefaultStyle.dp
height: Math.round(5 * DefaultStyle.dp)
color: DefaultStyle.main1_500_main
anchors.bottom: parent.bottom
anchors.left: parent.left
@ -93,7 +93,7 @@ Control.TabBar {
elide: Text.ElideRight
maximumLineCount: 1
text: modelData
bottomPadding: 5 * DefaultStyle.dp
bottomPadding: Math.round(5 * DefaultStyle.dp)
}
}
}

View file

@ -8,8 +8,8 @@ import SettingsCpp
Control.TabBar {
id: mainItem
//spacing: 32 * DefaultStyle.dp
topPadding: 36 * DefaultStyle.dp
//spacing: Math.round(32 * DefaultStyle.dp)
topPadding: Math.round(36 * DefaultStyle.dp)
property var model
readonly property alias cornerRadius: bottomLeftCorner.radius
@ -39,8 +39,8 @@ Control.TabBar {
id: unreadNotifications
property int unread: 0
visible: unread > 0
width: 15 * DefaultStyle.dp
height: 15 * DefaultStyle.dp
width: Math.round(15 * DefaultStyle.dp)
height: Math.round(15 * DefaultStyle.dp)
radius: width/2
color: DefaultStyle.danger_500main
Text{
@ -50,7 +50,7 @@ Control.TabBar {
horizontalAlignment: Text.AlignHCenter
color: DefaultStyle.grey_0
fontSizeMode: Text.Fit
font.pixelSize: 15 * DefaultStyle.dp
font.pixelSize: Math.round(15 * DefaultStyle.dp)
text: parent.unread > 100 ? '99+' : parent.unread
}
}
@ -78,7 +78,7 @@ Control.TabBar {
id: bottomLeftCorner
anchors.fill: parent
color: DefaultStyle.main1_500_main
radius: 25 * DefaultStyle.dp
radius: Math.round(25 * DefaultStyle.dp)
}
Rectangle {
color: DefaultStyle.main1_500_main
@ -101,8 +101,8 @@ Control.TabBar {
id: tabButton
width: mainItem.width
height: visible && buttonIcon.isImageReady ? undefined : 0
bottomInset: 32 * DefaultStyle.dp
topInset: 32 * DefaultStyle.dp
bottomInset: Math.round(32 * DefaultStyle.dp)
topInset: Math.round(32 * DefaultStyle.dp)
hoverEnabled: true
visible: modelData?.visible != undefined ? modelData?.visible : true
UnreadNotification {
@ -114,7 +114,7 @@ Control.TabBar {
? defaultAccount.core?.unreadMessageNotifications || -1
: 0
anchors.right: parent.right
anchors.rightMargin: 15 * DefaultStyle.dp
anchors.rightMargin: Math.round(15 * DefaultStyle.dp)
anchors.top: parent.top
}
MouseArea {
@ -125,7 +125,7 @@ Control.TabBar {
contentItem: ColumnLayout {
EffectImage {
id: buttonIcon
property int buttonSize: mainItem.currentIndex !== index && tabButton.hovered ? 26 * DefaultStyle.dp : 24 * DefaultStyle.dp
property real buttonSize: mainItem.currentIndex !== index && tabButton.hovered ? Math.round(26 * DefaultStyle.dp) : Math.round(24 * DefaultStyle.dp)
imageSource: mainItem.currentIndex === index ? modelData.selectedIcon : modelData.icon
Layout.preferredWidth: buttonSize
Layout.preferredHeight: buttonSize
@ -140,19 +140,19 @@ Control.TabBar {
text: modelData.label
font {
weight: mainItem.currentIndex === index
? 800 * DefaultStyle.dp
? Math.round(800 * DefaultStyle.dp)
: tabButton.hovered
? 600 * DefaultStyle.dp
: 400 * DefaultStyle.dp
pixelSize: 11 * DefaultStyle.dp
? Math.round(600 * DefaultStyle.dp)
: Math.round(400 * DefaultStyle.dp)
pixelSize: Math.round(11 * DefaultStyle.dp)
}
color: DefaultStyle.grey_0
Layout.fillWidth: true
Layout.preferredHeight: txtMeter.height
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
leftPadding: 3 * DefaultStyle.dp
rightPadding: 3 * DefaultStyle.dp
leftPadding: Math.round(3 * DefaultStyle.dp)
rightPadding: Math.round(3 * DefaultStyle.dp)
}
}
TextMetrics {
@ -160,7 +160,7 @@ Control.TabBar {
text: modelData.label
font: buttonText.font
Component.onCompleted: {
font.weight = 800 * DefaultStyle.dp
font.weight = Math.round(800 * DefaultStyle.dp)
mainItem.implicitWidth = Math.max(mainItem.implicitWidth, advanceWidth + buttonIcon.buttonSize)
}
}

View file

@ -15,7 +15,7 @@ ListView {
property SearchBar searchBar
property bool loading: false
property string searchText: searchBar?.text
property double busyIndicatorSize: 60 * DefaultStyle.dp
property real busyIndicatorSize: Math.round(60 * DefaultStyle.dp)
signal resultsReceived
@ -33,14 +33,14 @@ ListView {
onFilterTextChanged: maxDisplayItems = initialDisplayItems
initialDisplayItems: Math.max(
20,
2 * mainItem.height / (56 * DefaultStyle.dp))
2 * mainItem.height / (Math.round(56 * DefaultStyle.dp)))
displayItemsStep: 3 * initialDisplayItems / 2
onModelReset: {
mainItem.resultsReceived()
}
}
flickDeceleration: 10000
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
Keys.onPressed: event => {
if (event.key == Qt.Key_Escape) {
@ -123,12 +123,12 @@ ListView {
property int lastMouseContainsIndex: -1
delegate: FocusScope {
width: mainItem.width
height: 56 * DefaultStyle.dp
height: Math.round(56 * DefaultStyle.dp)
RowLayout {
z: 1
anchors.fill: parent
anchors.leftMargin: 10 * DefaultStyle.dp
spacing: 10 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
spacing: Math.round(10 * DefaultStyle.dp)
Avatar {
id: historyAvatar
property var contactObj: UtilsCpp.findFriendByAddress(
@ -136,8 +136,8 @@ ListView {
contact: contactObj?.value || null
displayNameVal: modelData.core.displayName
secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified
width: 45 * DefaultStyle.dp
height: 45 * DefaultStyle.dp
width: Math.round(45 * DefaultStyle.dp)
height: Math.round(45 * DefaultStyle.dp)
isConference: modelData.core.isConference
shadowEnabled: false
asynchronous: false
@ -145,20 +145,20 @@ ListView {
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Text {
id: friendAddress
Layout.fillWidth: true
maximumLineCount: 1
text: historyAvatar.displayNameVal
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
capitalization: Font.Capitalize
}
}
RowLayout {
spacing: 6 * DefaultStyle.dp
spacing: Math.round(6 * DefaultStyle.dp)
EffectImage {
id: statusIcon
imageSource: modelData.core.status === LinphoneEnums.CallStatus.Declined
@ -175,8 +175,8 @@ ListView {
|| modelData.core.status
=== LinphoneEnums.CallStatus.EarlyAborted
|| modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main
Layout.preferredWidth: 12 * DefaultStyle.dp
Layout.preferredHeight: 12 * DefaultStyle.dp
Layout.preferredWidth: Math.round(12 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(12 * DefaultStyle.dp)
transform: Rotation {
angle: modelData.core.isOutgoing
&& (modelData.core.status === LinphoneEnums.CallStatus.Declined
@ -195,8 +195,8 @@ ListView {
// text: modelData.core.date
text: UtilsCpp.formatDate(modelData.core.date)
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
@ -232,7 +232,7 @@ ListView {
Rectangle {
anchors.fill: parent
opacity: 0.7
radius: 8 * DefaultStyle.dp
radius: Math.round(8 * DefaultStyle.dp)
color: mainItem.currentIndex
=== index ? DefaultStyle.main2_200 : DefaultStyle.main2_100
visible: mainItem.lastMouseContainsIndex === index

View file

@ -14,7 +14,7 @@ ListView {
sourceModel: AppCpp.calls
}
implicitHeight: contentHeight
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
clip: true
onCountChanged: forceLayout()
@ -24,13 +24,13 @@ ListView {
property string currentRemoteAddress: callProxy.currentCall ? callProxy.currentCall.core.remoteAddress : ""
delegate: RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
width: mainItem.width
height: 45 * DefaultStyle.dp
height: Math.round(45 * DefaultStyle.dp)
Avatar {
id: delegateAvatar
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
_address: modelData.core.remoteAddress
isConference: modelData.core.isConference
shadowEnabled: false
@ -43,29 +43,29 @@ ListView {
text: modelData.core.isConference
? modelData.core.conference.core.subject
: remoteNameObj ? remoteNameObj.value : ""
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
Layout.fillWidth: true
maximumLineCount: 1
}
Text {
id: callStateText
property string type: modelData.core.isConference ? qsTr('Réunion') : qsTr('Appel')
Layout.rightMargin: 2 * DefaultStyle.dp
Layout.rightMargin: Math.round(2 * DefaultStyle.dp)
text: modelData.core.state === LinphoneEnums.CallState.Paused
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
? type + qsTr(" en pause")
: type + qsTr(" en cours")
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
Item{Layout.fillWidth: true}
Button {
id: transferButton
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.alignment: Qt.AlignVCenter
visible: mainItem.isTransferList && mainItem.currentRemoteAddress !== modelData.core.remoteAddress
icon.source: AppIcons.transferCall
@ -77,21 +77,21 @@ ListView {
Button {
id: pausingButton
enabled: !(modelData.core.state === LinphoneEnums.CallState.PausedByRemote)
Layout.preferredWidth: 28 * DefaultStyle.dp
Layout.preferredHeight: 28 * DefaultStyle.dp
Layout.preferredWidth: Math.round(28 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(28 * DefaultStyle.dp)
Layout.alignment: Qt.AlignVCenter
leftPadding: 5 * DefaultStyle.dp
rightPadding: 5 * DefaultStyle.dp
topPadding: 5 * DefaultStyle.dp
bottomPadding: 5 * DefaultStyle.dp
leftPadding: Math.round(5 * DefaultStyle.dp)
rightPadding: Math.round(5 * DefaultStyle.dp)
topPadding: Math.round(5 * DefaultStyle.dp)
bottomPadding: Math.round(5 * DefaultStyle.dp)
property bool pausedByUser: modelData.core.state === LinphoneEnums.CallState.Paused
color: pausedByUser ? DefaultStyle.success_500main : DefaultStyle.grey_500
contentImageColor: DefaultStyle.grey_0
KeyNavigation.right: endCallButton
KeyNavigation.left: endCallButton
icon.source: pausedByUser ? AppIcons.play : AppIcons.pause
icon.width: 18 * DefaultStyle.dp
icon.height: 18 * DefaultStyle.dp
icon.width: Math.round(18 * DefaultStyle.dp)
icon.height: Math.round(18 * DefaultStyle.dp)
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
TextMetrics {
id: pauseMeter
@ -101,14 +101,14 @@ ListView {
}
SmallButton {
id: endCallButton
Layout.preferredWidth: 38 * DefaultStyle.dp
Layout.preferredHeight: 28 * DefaultStyle.dp
Layout.preferredWidth: Math.round(38 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(28 * DefaultStyle.dp)
style: ButtonStyle.phoneRed
KeyNavigation.left: pausingButton
KeyNavigation.right: pausingButton
contentImageColor: DefaultStyle.grey_0
icon.width: 18 * DefaultStyle.dp
icon.height: 18 * DefaultStyle.dp
icon.width: Math.round(18 * DefaultStyle.dp)
icon.height: Math.round(18 * DefaultStyle.dp)
onClicked: {
mainWindow.callTerminatedByUser = true
mainWindow.endCall(modelData)

View file

@ -8,63 +8,63 @@ ColumnLayout {
id: mainItem
property var call
property string objectName: "statsPanel"
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
RoundedPane {
Layout.fillWidth: true
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
topPadding: 13 * DefaultStyle.dp
bottomPadding: 13 * DefaultStyle.dp
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
topPadding: Math.round(13 * DefaultStyle.dp)
bottomPadding: Math.round(13 * DefaultStyle.dp)
Layout.topMargin: 13 * DefaultStyle.dp
Layout.leftMargin: 16 * DefaultStyle.dp
Layout.rightMargin: 16 * DefaultStyle.dp
Layout.topMargin: Math.round(13 * DefaultStyle.dp)
Layout.leftMargin: Math.round(16 * DefaultStyle.dp)
Layout.rightMargin: Math.round(16 * DefaultStyle.dp)
contentItem: ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Text {
text: qsTr("Audio")
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Typography.p2.weight
}
}
ColumnLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Text {
text: mainItem.call ? mainItem.call.core.audioStats.codec : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.audioStats.bandwidth : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.audioStats.lossRate : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.audioStats.jitterBufferSize : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
@ -72,68 +72,68 @@ ColumnLayout {
}
RoundedPane {
Layout.fillWidth: true
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
topPadding: 13 * DefaultStyle.dp
bottomPadding: 13 * DefaultStyle.dp
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
topPadding: Math.round(13 * DefaultStyle.dp)
bottomPadding: Math.round(13 * DefaultStyle.dp)
Layout.leftMargin: 16 * DefaultStyle.dp
Layout.rightMargin: 16 * DefaultStyle.dp
Layout.leftMargin: Math.round(16 * DefaultStyle.dp)
Layout.rightMargin: Math.round(16 * DefaultStyle.dp)
visible: mainItem.call?.core.localVideoEnabled || mainItem.call?.core.remoteVideoEnabled || false
contentItem: ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Text {
text: qsTr("Vidéo")
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Typography.p2.weight
}
}
ColumnLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Text {
text: mainItem.call ? mainItem.call.core.videoStats.codec : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.videoStats.bandwidth : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.videoStats.lossRate : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.videoStats.resolution : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: mainItem.call ? mainItem.call.core.videoStats.fps : ""
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}

View file

@ -45,12 +45,12 @@ Flickable {
property bool haveFavorites: false
property bool haveContacts: count > 0
property int sectionsPixelSize: 16 * DefaultStyle.dp
property int sectionsWeight: 800 * DefaultStyle.dp
property int sectionsSpacing: 18 * DefaultStyle.dp
property int busyIndicatorSize: 40 * DefaultStyle.dp
property real sectionsPixelSize: Typography.h4.pixelSize
property real sectionsWeight: Typography.h4.weight
property real sectionsSpacing: Math.round(18 * DefaultStyle.dp)
property real busyIndicatorSize: Math.round(40 * DefaultStyle.dp)
property int itemsRightMargin: 39 * DefaultStyle.dp
property real itemsRightMargin: Math.round(39 * DefaultStyle.dp)
property int count: contactsList.count + suggestionsList.count + favoritesList.count
contentHeight: contentsLayout.height
@ -235,7 +235,7 @@ Flickable {
Control.ScrollBar.vertical: ScrollBar {
id: scrollbar
z: 1
topPadding: 24 * DefaultStyle.dp // Avoid to be on top of collapse button
topPadding: Math.round(24 * DefaultStyle.dp) // Avoid to be on top of collapse button
active: true
interactive: true
visible: mainItem.contentHeight > mainItem.height
@ -245,7 +245,7 @@ Flickable {
ColumnLayout {
id: contentsLayout
width: mainItem.width
spacing: 0 //20 * DefaultStyle.dp
spacing: 0 //Math.round(20 * DefaultStyle.dp)
BusyIndicator {
id: busyIndicator
@ -307,7 +307,7 @@ Flickable {
visible: contentHeight > 0
Layout.fillWidth: true
Layout.preferredHeight: implicitHeight
Layout.topMargin: favoritesList.height > 0 ? 4 * DefaultStyle.dp : 0
Layout.topMargin: favoritesList.height > 0 ? Math.round(4 * DefaultStyle.dp) : 0
interactive: false
highlightText: mainItem.highlightText
showActions: mainItem.showActions
@ -346,7 +346,7 @@ Flickable {
|| SettingsCpp.syncLdapContacts ? MagicSearchProxy.FilteringTypes.Ldap | MagicSearchProxy.FilteringTypes.CardDAV : 0)
initialDisplayItems: Math.max(
20,
2 * mainItem.height / (63 * DefaultStyle.dp))
2 * mainItem.height / (Math.round(63 * DefaultStyle.dp)))
displayItemsStep: 3 * initialDisplayItems / 2
onLocalFriendCreated: index => {
contactsList.selectIndex(index)
@ -359,7 +359,7 @@ Flickable {
Layout.fillWidth: true
Layout.preferredHeight: implicitHeight
Layout.topMargin: contactsList.height + favoritesList.height
> 0 ? 4 * DefaultStyle.dp : 0
> 0 ? Math.round(4 * DefaultStyle.dp) : 0
interactive: false
showInitials: false
highlightText: mainItem.highlightText
@ -396,7 +396,7 @@ Flickable {
&& contactsList.expanded ? 0 : Math.max(
20,
2 * mainItem.height
/ (63 * DefaultStyle.dp))
/ (Math.round(63 * DefaultStyle.dp)))
onInitialDisplayItemsChanged: maxDisplayItems = initialDisplayItems
displayItemsStep: 3 * initialDisplayItems / 2
onModelReset: maxDisplayItems = initialDisplayItems

View file

@ -95,7 +95,7 @@ Loader{
z: 1
color: "transparent"
border {
width: 2 * DefaultStyle.dp
width: Math.round(2 * DefaultStyle.dp)
color: mainItem.secured ? DefaultStyle.info_500_main : DefaultStyle.danger_500main
}
EffectImage {
@ -136,7 +136,7 @@ Loader{
: DefaultStyle.main2_500main
: "transparent"
border {
width: 2 * DefaultStyle.dp
width: Math.round(2 * DefaultStyle.dp)
color: DefaultStyle.grey_0
}
}
@ -162,7 +162,7 @@ Loader{
text: initialItem.initials
font {
pixelSize: initialItem.height * 36 / 120
weight: 800 * DefaultStyle.dp
weight: Typography.h4.weight
capitalization: Font.AllUppercase
}
}

View file

@ -11,7 +11,7 @@ import SettingsCpp
Control.Control{
id: mainItem
padding: 10 * DefaultStyle.dp
padding: Math.round(10 * DefaultStyle.dp)
property AccountGui account
property color backgroundColor: DefaultStyle.grey_0
@ -20,7 +20,7 @@ Control.Control{
signal edit()
background: Rectangle {
radius: 10 * DefaultStyle.dp
radius: Math.round(10 * DefaultStyle.dp)
color: mainItem.backgroundColor
MouseArea{
id: mouseArea
@ -31,11 +31,11 @@ Control.Control{
contentItem: RowLayout{
spacing: 0
RowLayout {
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
Avatar{
id: avatar
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
account: mainItem.account
MouseArea{
anchors.fill: parent
@ -43,9 +43,9 @@ Control.Control{
}
}
Item {
Layout.preferredWidth: 200 * DefaultStyle.dp
Layout.preferredWidth: Math.round(200 * DefaultStyle.dp)
Layout.fillHeight: true
Layout.rightMargin: 10 * DefaultStyle.dp
Layout.rightMargin: Math.round(10 * DefaultStyle.dp)
ContactDescription{
id: description
anchors.fill: parent
@ -55,18 +55,18 @@ Control.Control{
}
Control.Control {
id: registrationStatusItem
Layout.minimumWidth: 49 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
topPadding: 4 * DefaultStyle.dp
bottomPadding: 4 * DefaultStyle.dp
leftPadding: 8 * DefaultStyle.dp
rightPadding: 8 * DefaultStyle.dp
Layout.preferredWidth: text.implicitWidth + (2 * 8 * DefaultStyle.dp)
Layout.minimumWidth: Math.round(49 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
topPadding: Math.round(4 * DefaultStyle.dp)
bottomPadding: Math.round(4 * DefaultStyle.dp)
leftPadding: Math.round(8 * DefaultStyle.dp)
rightPadding: Math.round(8 * DefaultStyle.dp)
Layout.preferredWidth: text.implicitWidth + (2 * Math.round(8 * DefaultStyle.dp))
background: Rectangle{
id: registrationStatus
anchors.fill: parent
color: DefaultStyle.main2_200
radius: 90 * DefaultStyle.dp
radius: Math.round(90 * DefaultStyle.dp)
}
contentItem: Text {
id: text
@ -88,8 +88,8 @@ Control.Control{
// repeat: true
// onTriggered: text.mode = (++text.mode) % 4
// }
font.weight: 300 * DefaultStyle.dp
font.pixelSize: 12 * DefaultStyle.dp
font.weight: Math.round(300 * DefaultStyle.dp)
font.pixelSize: Math.round(12 * DefaultStyle.dp)
color: mode == 0
? DefaultStyle.success_500main
: mode == 1
@ -107,31 +107,31 @@ Control.Control{
}
}
Item{
Layout.preferredWidth: 26 * DefaultStyle.dp
Layout.preferredHeight: 26 * DefaultStyle.dp
Layout.preferredWidth: Math.round(26 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(26 * DefaultStyle.dp)
Layout.fillHeight: true
Layout.leftMargin: 40 * DefaultStyle.dp
Layout.leftMargin: Math.round(40 * DefaultStyle.dp)
visible: mainItem.account.core.unreadCallNotifications > 0
Rectangle{
id: unreadNotifications
anchors.verticalCenter: parent.verticalCenter
width: 26 * DefaultStyle.dp
height: 26 * DefaultStyle.dp
width: Math.round(26 * DefaultStyle.dp)
height: Math.round(26 * DefaultStyle.dp)
radius: width/2
color: DefaultStyle.danger_500main
border.color: DefaultStyle.grey_0
border.width: 2 * DefaultStyle.dp
border.width: Math.round(2 * DefaultStyle.dp)
Text{
id: unreadCount
anchors.fill: parent
anchors.margins: 2 * DefaultStyle.dp
anchors.margins: Math.round(2 * DefaultStyle.dp)
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
color: DefaultStyle.grey_0
minimumPixelSize: 5
fontSizeMode: Text.Fit
font.pixelSize: 11 * DefaultStyle.dp
font.weight: 700 * DefaultStyle.dp
font.pixelSize: Math.round(11 * DefaultStyle.dp)
font.weight: Math.round(700 * DefaultStyle.dp)
text: mainItem.account.core.unreadCallNotifications >= 100 ? '99+' : mainItem.account.core.unreadCallNotifications
}
}
@ -144,10 +144,10 @@ Control.Control{
}
}
Voicemail {
Layout.leftMargin: 18 * DefaultStyle.dp
Layout.rightMargin: 20 * DefaultStyle.dp
Layout.preferredWidth: 30 * DefaultStyle.dp
Layout.preferredHeight: 26 * DefaultStyle.dp
Layout.leftMargin: Math.round(18 * DefaultStyle.dp)
Layout.rightMargin: Math.round(20 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(30 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(26 * DefaultStyle.dp)
scaleFactor: 0.7
showMwi: mainItem.account.core.showMwi
visible: mainItem.account.core.voicemailAddress.length > 0 || mainItem.account.core.showMwi
@ -163,11 +163,11 @@ Control.Control{
EffectImage {
id: manageAccount
imageSource: AppIcons.manageProfile
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
visible: !SettingsCpp.hideAccountSettings
width: 24 * DefaultStyle.dp
width: Math.round(24 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
colorizationColor: DefaultStyle.main2_500main
MouseArea{

View file

@ -10,7 +10,7 @@ import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle
FocusScope {
id: mainItem
implicitHeight: visible ? 56 * DefaultStyle.dp : 0
implicitHeight: visible ? Math.round(56 * DefaultStyle.dp) : 0
property var searchResultItem
property bool showInitials: true // Display Initials of Display name.
property bool showDefaultAddress: true // Display address below display name.
@ -30,7 +30,7 @@ FocusScope {
property var previousInitial
// Use directly previous initial
property int itemsRightMargin: 39 * DefaultStyle.dp
property real itemsRightMargin: Math.round(39 * DefaultStyle.dp)
property var displayName: searchResultItem.core.fullName
property string initial: displayName ? displayName[0].toLocaleLowerCase(
@ -45,15 +45,15 @@ FocusScope {
anchors.left: parent.left
visible: mainItem.showInitials
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 15 * DefaultStyle.dp
anchors.rightMargin: Math.round(15 * DefaultStyle.dp)
verticalAlignment: Text.AlignVCenter
width: 20 * DefaultStyle.dp
width: Math.round(20 * DefaultStyle.dp)
opacity: previousInitial != mainItem.initial ? 1 : 0
text: mainItem.initial
color: DefaultStyle.main2_400
font {
pixelSize: 20 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
capitalization: Font.AllUppercase
}
}
@ -64,12 +64,12 @@ FocusScope {
anchors.rightMargin: mainItem.itemsRightMargin
anchors.top: parent.top
anchors.bottom: parent.bottom
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
z: 1
Avatar {
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.leftMargin: 5 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
Layout.leftMargin: Math.round(5 * DefaultStyle.dp)
contact: searchResultItem
shadowEnabled: false
}
@ -79,17 +79,15 @@ FocusScope {
text: UtilsCpp.boldTextPart(mainItem.displayName,
mainItem.highlightText)
font {
pixelSize: mainItem.showDefaultAddress ? 16 * DefaultStyle.dp : 14
* DefaultStyle.dp
pixelSize: mainItem.showDefaultAddress ? Typography.h4.pixelSize : Typography.p1.pixelSize
capitalization: mainItem.displayNameCapitalization ? Font.Capitalize : Font.MixedCase
weight: mainItem.showDefaultAddress ? 800 * DefaultStyle.dp : 400
* DefaultStyle.dp
weight: mainItem.showDefaultAddress ? Typography.h4.weight : Typography.p1.weight
}
maximumLineCount: 1
Layout.fillWidth: true
}
Text {
Layout.topMargin: 2 * DefaultStyle.dp
Layout.topMargin: Math.round(2 * DefaultStyle.dp)
Layout.fillWidth: true
visible: mainItem.showDefaultAddress
property string address: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(searchResultItem.core.defaultAddress) : searchResultItem.core.defaultAddress
@ -97,8 +95,8 @@ FocusScope {
maximumLineCount: 1
elide: Text.ElideRight
font {
weight: 300 * DefaultStyle.dp
pixelSize: 12 * DefaultStyle.dp
weight: Math.round(300 * DefaultStyle.dp)
pixelSize: Math.round(12 * DefaultStyle.dp)
}
}
}
@ -110,37 +108,37 @@ FocusScope {
asynchronous: true
active: mainItem.showActions || mainItem.showContactMenu
|| mainItem.multiSelectionEnabled
Layout.rightMargin: active ? 10 * DefaultStyle.dp : 0
Layout.rightMargin: active ? Math.round(10 * DefaultStyle.dp) : 0
sourceComponent: RowLayout {
id: actionsRow
z: 1
visible: actionButtons.visible || friendPopup.visible
|| mainItem.multiSelectionEnabled
spacing: visible ? 16 * DefaultStyle.dp : 0
spacing: visible ? Math.round(16 * DefaultStyle.dp) : 0
enabled: visible
EffectImage {
id: isSelectedCheck
visible: mainItem.multiSelectionEnabled
&& (mainItem.selectedContacts.indexOf(
searchResultItem.core.defaultAddress) != -1)
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
imageSource: AppIcons.check
colorizationColor: DefaultStyle.main1_500_main
}
RowLayout {
id: actionButtons
visible: mainItem.showActions
spacing: visible ? 10 * DefaultStyle.dp : 0
spacing: visible ? Math.round(10 * DefaultStyle.dp) : 0
IconButton {
id: callButton
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.phone
focus: visible
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
style: ButtonStyle.grey
onClicked: UtilsCpp.createCall(
searchResultItem.core.defaultFullAddress)
@ -150,13 +148,13 @@ FocusScope {
IconButton {
id: videoCallButton
visible: SettingsCpp.videoEnabled
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.videoCamera
focus: visible && !callButton.visible
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
style: ButtonStyle.grey
onClicked: UtilsCpp.createCall(
searchResultItem.core.defaultFullAddress,
@ -170,14 +168,14 @@ FocusScope {
id: chatButton
visible: actionButtons.visible
&& !SettingsCpp.disableChatFeature
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.chatTeardropText
focus: visible && !callButton.visible
&& !videoCallButton.visible
radius: 40 * DefaultStyle.dp
radius: Math.round(40 * DefaultStyle.dp)
style: ButtonStyle.grey
KeyNavigation.left: videoCallButton
KeyNavigation.right: callButton
@ -187,7 +185,7 @@ FocusScope {
id: friendPopup
z: 1
popup.x: 0
popup.padding: 10 * DefaultStyle.dp
popup.padding: Math.round(10 * DefaultStyle.dp)
visible: mainItem.showContactMenu
&& (contactArea.containsMouse || hovered
|| popup.opened)
@ -201,7 +199,7 @@ FocusScope {
"Enlever des favoris") : qsTr(
"Mettre en favori")
icon.source: searchResultItem.core.starred ? AppIcons.heartFill : AppIcons.heart
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
textColor: DefaultStyle.main2_500main
hoveredImageColor: searchResultItem.core.starred ? DefaultStyle.main1_700 : DefaultStyle.danger_700
contentImageColor: searchResultItem.core.starred ? DefaultStyle.danger_500main : DefaultStyle.main2_600
@ -215,7 +213,7 @@ FocusScope {
IconLabelButton {
text: qsTr("Partager")
icon.source: AppIcons.shareNetwork
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
textColor: DefaultStyle.main2_500main
onClicked: {
var vcard = searchResultItem.core.getVCard()
@ -242,7 +240,7 @@ FocusScope {
IconLabelButton {
text: qsTr("Supprimer")
icon.source: AppIcons.trashCan
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
visible: !searchResultItem.core.readOnly
onClicked: {
mainItem.contactDeletionRequested(
@ -271,7 +269,7 @@ FocusScope {
}
Rectangle {
anchors.fill: contactArea
radius: 8 * DefaultStyle.dp
radius: Math.round(8 * DefaultStyle.dp)
opacity: 0.7
color: mainItem.isSelected ? DefaultStyle.main2_200 : DefaultStyle.main2_100
visible: mainItem.isLastHovered || mainItem.isSelected

View file

@ -37,13 +37,13 @@ ListView {
property bool haveFavorites: false
property bool haveContacts: count > 0
property int sectionsPixelSize: 16 * DefaultStyle.dp
property int sectionsWeight: 800 * DefaultStyle.dp
property int sectionsSpacing: 18 * DefaultStyle.dp
property real sectionsPixelSize: Typography.h4.pixelSize
property real sectionsWeight: Typography.h4.weight
property real sectionsSpacing: Math.round(18 * DefaultStyle.dp)
property int itemsRightMargin: 39 * DefaultStyle.dp
property real itemsRightMargin: Math.round(39 * DefaultStyle.dp)
property bool expanded: true
property int headerHeight: headerItem?.height
property real headerHeight: headerItem?.height
signal contactDeletionRequested(FriendGui contact)
signal contactSelected(FriendGui contact) // Click/Space/Enter
@ -55,7 +55,7 @@ ListView {
highlightFollowsCurrentItem: false
cacheBuffer: 400
implicitHeight: contentHeight
spacing: expanded ? 4 * DefaultStyle.dp : 0
spacing: expanded ? Math.round(4 * DefaultStyle.dp) : 0
property var _currentItemY: currentItem?.y
on_CurrentItemYChanged: if(_currentItemY){
@ -151,7 +151,7 @@ ListView {
Item{// Do not use directly RowLayout : there is an issue where the layout doesn't update on visible
Layout.fillWidth: true
Layout.preferredHeight: mainItem.count > 0 ? headerTitleLayout.implicitHeight : 0
Layout.bottomMargin: 4 * DefaultStyle.dp
Layout.bottomMargin: Math.round(4 * DefaultStyle.dp)
RowLayout {
id: headerTitleLayout
anchors.fill: parent
@ -174,9 +174,9 @@ ListView {
icon.source: mainItem.expanded ? AppIcons.upArrow : AppIcons.downArrow
Layout.fillHeight: true
Layout.preferredWidth: height
Layout.rightMargin: 23 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
Layout.rightMargin: Math.round(23 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
focus: true
onClicked: mainItem.expanded = !mainItem.expanded
}

View file

@ -10,8 +10,8 @@ Rectangle{
id: mainItem
property int voicemailCount: 0
property bool showMwi: false
width: 42 * DefaultStyle.dp * scaleFactor
height: 36 * DefaultStyle.dp * scaleFactor
width: Math.round(42 * DefaultStyle.dp) * scaleFactor
height: Math.round(36 * DefaultStyle.dp) * scaleFactor
property real scaleFactor: 1.0
signal clicked()
color: 'transparent'
@ -20,7 +20,7 @@ Rectangle{
anchors.left: parent.left
icon.source: AppIcons.voicemail
icon.color: DefaultStyle.main2_600
width: 33 * DefaultStyle.dp * scaleFactor
width: Math.round(33 * DefaultStyle.dp) * scaleFactor
height: width
icon.width: width
icon.height: width
@ -35,11 +35,11 @@ Rectangle{
Text {
anchors.top: parent.top
anchors.right: parent.right
width: 14 * DefaultStyle.dp * scaleFactor
width: Math.round(14 * DefaultStyle.dp) * scaleFactor
height: width
horizontalAlignment: Text.AlignHCenter
font.weight: 700 * DefaultStyle.dp
font.pixelSize: 13 * DefaultStyle.dp * scaleFactor
font.weight: Typography.p2.pixelSize
font.pixelSize: Typography.p2.weight * scaleFactor
color: DefaultStyle.danger_500main
text: voicemailCount >= 100 ? '99+' : voicemailCount
visible: showMwi && voicemailCount > 0
@ -51,12 +51,12 @@ Rectangle{
anchors.right: parent.right
color: DefaultStyle.danger_500main
visible: showMwi && voicemailCount == 0
width: 14 * DefaultStyle.dp * scaleFactor
width: Math.round(14 * DefaultStyle.dp) * scaleFactor
height: width
radius: width / 2
EffectImage {
anchors.fill: parent
anchors.margins: 1.5 * DefaultStyle.dp * scaleFactor
anchors.margins: Math.round(1.5 * DefaultStyle.dp) * scaleFactor
imageSource: AppIcons.bellMwi
colorizationColor: DefaultStyle.grey_0
}

View file

@ -13,8 +13,8 @@ Loader {
property var imageSource
property var fillMode: Image.PreserveAspectFit
property var colorizationColor
property int imageWidth: width
property int imageHeight: height
property real imageWidth: width
property real imageHeight: height
property bool useColor: colorizationColor != undefined
property bool shadowEnabled: false
property bool isImageReady: false

View file

@ -3,11 +3,11 @@ import Linphone
Item {
id: mainItem
property int borderWidth: 1 * DefaultStyle.dp
property real borderWidth: Math.max(Math.round(1 * DefaultStyle.dp), 1)
property alias borderGradient: border.gradient
property alias gradient: fill.gradient
property alias color: fill.color
property int radius
property real radius
Rectangle {
id: border
radius: mainItem.radius
@ -24,4 +24,4 @@ Item {
radius: mainItem.radius
}
}
}
}

View file

@ -21,7 +21,7 @@ ListView {
clip: true
cacheBuffer: height/2
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
highlightFollowsCurrentItem: false
function selectIndex(index){
@ -86,7 +86,7 @@ ListView {
id: confInfoProxy
filterText: searchBarText
filterType: ConferenceInfoProxy.None
initialDisplayItems: Math.max(20, 2 * mainItem.height / (63 * DefaultStyle.dp))
initialDisplayItems: Math.max(20, 2 * mainItem.height / (Math.round(63 * DefaultStyle.dp)))
displayItemsStep: initialDisplayItems/2
function selectData(confInfoGui){
mainItem.currentIndex = loadUntil(confInfoGui)
@ -105,7 +105,7 @@ ListView {
ScrollBar.vertical: ScrollBar {
id: scrollbar
rightPadding: 8 * DefaultStyle.dp
rightPadding: Math.round(8 * DefaultStyle.dp)
active: true
interactive: true
@ -115,14 +115,14 @@ ListView {
section {
criteria: ViewSection.FullString
delegate: Text {
topPadding: 24 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
topPadding: Math.round(24 * DefaultStyle.dp)
bottomPadding: Math.round(16 * DefaultStyle.dp)
text: section
height: 29 * DefaultStyle.dp + topPadding + bottomPadding
height: Math.round(29 * DefaultStyle.dp) + topPadding + bottomPadding
wrapMode: Text.NoWrap
font {
pixelSize: 20 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Math.round(800 * DefaultStyle.dp)
capitalization: Font.Capitalize
}
}
@ -131,7 +131,7 @@ ListView {
delegate: FocusScope {
id: itemDelegate
height: 63 * DefaultStyle.dp + (!isFirst && dateDay.visible ? topOffset : 0)
height: Math.round(63 * DefaultStyle.dp) + (!isFirst && dateDay.visible ? topOffset : 0)
width: mainItem.width
enabled: !isCanceled && haveModel
@ -143,7 +143,7 @@ ListView {
property string dateString: UtilsCpp.toDateString(dateTime)
property string previousDateString: previousConfInfoGui ? UtilsCpp.toDateString(previousConfInfoGui.core ? previousConfInfoGui.core.dateTime : UtilsCpp.getCurrentDateTime()) : ''
property bool isFirst : ListView.previousSection !== ListView.section
property int topOffset: (dateDay.visible && !isFirst? 8 * DefaultStyle.dp : 0)
property real topOffset: (dateDay.visible && !isFirst? Math.round(8 * DefaultStyle.dp) : 0)
property var endDateTime: itemGui.core ? itemGui.core.endDateTime : UtilsCpp.getCurrentDateTime()
property bool haveModel: itemGui.core ? itemGui.core.haveModel : false
property bool isCanceled: itemGui.core ? itemGui.core.state === LinphoneEnums.ConferenceInfoState.Cancelled : false
@ -155,34 +155,34 @@ ListView {
anchors.topMargin: !itemDelegate.isFirst && dateDay.visible ? itemDelegate.topOffset : 0
spacing: 0
Item{
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
visible: !dateDay.visible
}
ColumnLayout {
id: dateDay
Layout.fillWidth: false
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.minimumWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 51 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.minimumWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(51 * DefaultStyle.dp)
visible: previousDateString.length == 0 || previousDateString != dateString
spacing: 0
Text {
Layout.preferredHeight: 19 * DefaultStyle.dp
Layout.preferredHeight: Math.round(19 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
text: day.substring(0,3) + '.'
color: DefaultStyle.main2_500main
wrapMode: Text.NoWrap
elide: Text.ElideNone
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
capitalization: Font.Capitalize
}
}
Rectangle {
id: dayNum
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
radius: height/2
property var isCurrentDay: UtilsCpp.isCurrentDay(dateTime)
@ -197,48 +197,48 @@ ListView {
color: dayNum.isCurrentDay ? DefaultStyle.grey_0 : DefaultStyle.main2_500main
wrapMode: Text.NoWrap
font {
pixelSize: 20 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Math.round(800 * DefaultStyle.dp)
}
}
}
Item{Layout.fillHeight:true;Layout.fillWidth: true}
}
Item {
Layout.preferredWidth: 265 * DefaultStyle.dp
Layout.preferredHeight: 63 * DefaultStyle.dp
Layout.leftMargin: 23 * DefaultStyle.dp
Layout.preferredWidth: Math.round(265 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(63 * DefaultStyle.dp)
Layout.leftMargin: Math.round(23 * DefaultStyle.dp)
Rectangle {
id: conferenceInfoDelegate
anchors.fill: parent
anchors.rightMargin: 5 // margin to avoid clipping shadows at right
radius: 10 * DefaultStyle.dp
radius: Math.round(10 * DefaultStyle.dp)
visible: itemDelegate.haveModel || itemDelegate.activeFocus
color: itemDelegate.isSelected ? DefaultStyle.main2_200 : DefaultStyle.grey_0 // mainItem.currentIndex === index
ColumnLayout {
anchors.fill: parent
anchors.left: parent.left
anchors.leftMargin: 16 * DefaultStyle.dp
anchors.rightMargin: 16 * DefaultStyle.dp
anchors.topMargin: 10 * DefaultStyle.dp
anchors.bottomMargin: 10 * DefaultStyle.dp
spacing: 2 * DefaultStyle.dp
anchors.leftMargin: Math.round(16 * DefaultStyle.dp)
anchors.rightMargin: Math.round(16 * DefaultStyle.dp)
anchors.topMargin: Math.round(10 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(10 * DefaultStyle.dp)
spacing: Math.round(2 * DefaultStyle.dp)
visible: itemDelegate.haveModel
RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.usersThree
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
text: itemGui.core? itemGui.core.subject : ""
Layout.fillWidth: true
maximumLineCount: 1
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2.pixelSize
weight: Typography.p2.weight
}
}
}
@ -246,8 +246,8 @@ ListView {
text: itemDelegate.isCanceled ? qsTr("Réunion annulée") : UtilsCpp.toDateHourString(dateTime) + " - " + UtilsCpp.toDateHourString(endDateTime)
color: itemDelegate.isCanceled ? DefaultStyle.danger_500main : DefaultStyle.main2_500main
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
}
@ -262,16 +262,16 @@ ListView {
}
Text {
anchors.fill: parent
anchors.rightMargin: 5 * DefaultStyle.dp // margin to avoid clipping shadows at right
anchors.leftMargin: 16 * DefaultStyle.dp
anchors.rightMargin: Math.round(5 * DefaultStyle.dp) // margin to avoid clipping shadows at right
anchors.leftMargin: Math.round(16 * DefaultStyle.dp)
verticalAlignment: Text.AlignVCenter
visible: !itemDelegate.haveModel
text: qsTr("Aucune réunion aujourd'hui")
lineHeightMode: Text.FixedHeight
lineHeight: 17.71 * DefaultStyle.dp
lineHeight: Math.round(18 * DefaultStyle.dp)
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700
pixelSize: Typography.p2.pixelSize
weight: Typography.p2.weight
}
}
MouseArea {

View file

@ -10,8 +10,8 @@ ListView {
height: contentHeight
visible: contentHeight > 0
clip: true
rightMargin: 5 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
rightMargin: Math.round(5 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
property string searchBarText
@ -31,27 +31,27 @@ ListView {
}
delegate: Item {
height: 56 * DefaultStyle.dp
height: Math.round(56 * DefaultStyle.dp)
width: mainItem.width
RowLayout {
id: participantDelegate
anchors.left: parent.left
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
anchors.right: parent.right
anchors.rightMargin: 10 * DefaultStyle.dp
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
z: 1
Avatar {
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
_address: modelData.core.address
shadowEnabled: false
}
Text {
text: modelData.core.displayName
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
font.capitalization: mainItem.displayNameCapitalization ? Font.Capitalize : Font.MixedCase
maximumLineCount: 1
Layout.fillWidth: true

View file

@ -11,8 +11,8 @@ ListView {
height: contentHeight
visible: contentHeight > 0
clip: true
rightMargin: 5 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
rightMargin: Math.round(5 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
property string searchBarText
@ -36,27 +36,27 @@ ListView {
}
delegate: Item {
height: 56 * DefaultStyle.dp
height: Math.round(56 * DefaultStyle.dp)
width: mainItem.width
RowLayout {
id: participantDelegate
anchors.left: parent.left
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
anchors.right: parent.right
anchors.rightMargin: 10 * DefaultStyle.dp
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
z: 1
Avatar {
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
_address: modelData.core.sipAddress
shadowEnabled: false
}
Text {
text: modelData.core.displayName
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
font.capitalization: mainItem.displayNameCapitalization ? Font.Capitalize : Font.MixedCase
maximumLineCount: 1
Layout.fillWidth: true
@ -67,8 +67,8 @@ ListView {
text: qsTr("Admin")
color: DefaultStyle.main2_400
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
RowLayout {
@ -77,15 +77,15 @@ ListView {
onIsMeChanged: if (isMe) mainItem.me = modelData
enabled: mainItem.isMeAdmin && !modelData.core.isMe
opacity: enabled ? 1.0 : 0
spacing: 26 * DefaultStyle.dp
spacing: Math.round(26 * DefaultStyle.dp)
Switch {
Component.onCompleted: if (modelData.core.isAdmin) toggle()
//TODO : Utilser checked et onToggled (pas compris)
onToggled: participantModel.setParticipantAdminStatus(modelData.core, position === 1)
}
SmallButton {
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
color: DefaultStyle.main2_100
style: ButtonStyle.hoveredBackground
icon.source: AppIcons.closeX
@ -98,14 +98,14 @@ ListView {
footer: Rectangle {
color: DefaultStyle.grey_100
visible: mainItem.isMeAdmin
height: 74 * DefaultStyle.dp
height: Math.round(74 * DefaultStyle.dp)
width: mainItem.width
MediumButton {
anchors.centerIn: parent
height: 40 * DefaultStyle.dp
height: Math.round(40 * DefaultStyle.dp)
icon.source: AppIcons.plusCircle
icon.width: 16 * DefaultStyle.dp
icon.height: 16 * DefaultStyle.dp
icon.width: Math.round(16 * DefaultStyle.dp)
icon.height: Math.round(16 * DefaultStyle.dp)
text: qsTr("Ajouter des participants")
style: ButtonStyle.secondary
onClicked: mainItem.addParticipantRequested()

View file

@ -5,29 +5,29 @@ import Linphone
ProgressBar {
id: mainItem
padding: 3 * DefaultStyle.dp
padding: Math.round(3 * DefaultStyle.dp)
property color backgroundColor: DefaultStyle.main2_100
property color innerColor: DefaultStyle.info_500_main
property color innerTextColor: centeredText ? DefaultStyle.info_500_main : DefaultStyle.grey_0
property bool innerTextVisible: true
property string innerText: Number.parseFloat(value*100).toFixed(0) + "%"
property int barWidth: mainItem.visualPosition * mainItem.width
property real barWidth: mainItem.visualPosition * mainItem.width
property bool centeredText: textSize.width >= barWidth
TextMetrics{
id: textSize
text: mainItem.innerText
font {
pixelSize: 10 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(10 * DefaultStyle.dp)
weight: Math.round(700 * DefaultStyle.dp)
bold: true
}
}
background: Rectangle {
color: mainItem.backgroundColor
radius: 50 * DefaultStyle.dp
radius: Math.round(50 * DefaultStyle.dp)
anchors.fill: mainItem
width: mainItem.width
height: mainItem.height
@ -37,7 +37,7 @@ ProgressBar {
Rectangle {
id: bar
color: mainItem.innerColor
radius: 50 * DefaultStyle.dp
radius: Math.round(50 * DefaultStyle.dp)
width: mainItem.barWidth
height: parent.height
}
@ -51,8 +51,8 @@ ProgressBar {
color: mainItem.innerTextColor
maximumLineCount: 1
font {
pixelSize: 10 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(10 * DefaultStyle.dp)
weight: Math.round(700 * DefaultStyle.dp)
}
}
}

View file

@ -4,12 +4,12 @@ import Linphone
Control.Control {
id: mainItem
// width: 360 * DefaultStyle.dp
// width: Math.round(360 * DefaultStyle.dp)
property color backgroundColor: DefaultStyle.grey_0
padding: 10 * DefaultStyle.dp
padding: Math.round(10 * DefaultStyle.dp)
background: Rectangle {
anchors.fill: parent
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
color: mainItem.backgroundColor
}
}

View file

@ -7,7 +7,7 @@ import Linphone
Item {
id: mainItem
height: visible ? 50 * DefaultStyle.dp : 0
height: visible ? Math.round(50 * DefaultStyle.dp) : 0
anchors.right: parent.right
anchors.left: parent.left
@ -30,15 +30,15 @@ Item {
id: background
anchors.fill: parent
color: DefaultStyle.main2_200
radius: 35 * DefaultStyle.dp
radius: Math.round(35 * DefaultStyle.dp)
visible: parent.containsMouse || isSelected || mainItem.shadowEnabled
}
Rectangle {
id: backgroundRightFiller
anchors.right: parent.right
color: DefaultStyle.main2_200
width: 35 * DefaultStyle.dp
height: 50 * DefaultStyle.dp
width: Math.round(35 * DefaultStyle.dp)
height: Math.round(50 * DefaultStyle.dp)
visible: parent.containsMouse || isSelected
}
// MultiEffect {

View file

@ -25,7 +25,7 @@ Item {
property bool displayBorder : participantDevice && participantDevice.core.isSpeaking || false
property alias displayPresence: avatar.displayPresence
property color color: DefaultStyle.grey_600
property int radius: 15 * DefaultStyle.dp
property real radius: Math.round(15 * DefaultStyle.dp)
property bool remoteIsPaused: participantDevice
? participantDevice.core.isPaused
: previewEnabled
@ -70,15 +70,15 @@ Item {
radius: mainItem.radius
anchors.fill: parent
border.color: DefaultStyle.main2_200
border.width: mainItem.displayBorder ? 3 * DefaultStyle.dp : 0
property int minSize: Math.min(height, width)
border.width: mainItem.displayBorder ? Math.round(3 * DefaultStyle.dp) : 0
property real minSize: Math.min(height, width)
Item {
id: noCameraLayout
anchors.fill: parent
visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady
ColumnLayout {
anchors.top: parent.top
anchors.topMargin: 81 * DefaultStyle.dp
anchors.topMargin: Math.round(81 * DefaultStyle.dp)
anchors.horizontalCenter: parent.horizontalCenter
// Layout.alignment: Qt.AlignHCenter |Qt.AlignTop
spacing: 0
@ -90,8 +90,8 @@ Item {
BusyIndicator {
indicatorColor: DefaultStyle.main2_100
Layout.alignment: Qt.AlignHCenter
indicatorHeight: 42 * DefaultStyle.dp
indicatorWidth: 42 * DefaultStyle.dp
indicatorHeight: Math.round(42 * DefaultStyle.dp)
indicatorWidth: Math.round(42 * DefaultStyle.dp)
}
}
Item{
@ -100,7 +100,7 @@ Item {
anchors.centerIn: parent
height: mainItem.conference
? background.minSize * 142 / 372
: 120 * DefaultStyle.dp
: Math.round(120 * DefaultStyle.dp)
width: height
Avatar{
id: avatar
@ -117,29 +117,29 @@ Item {
spacing: 0
visible: mainItem.participantDevice && (mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Joining || mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Alerting) || false
BusyIndicator {
Layout.preferredHeight: 42 * DefaultStyle.dp
Layout.preferredHeight: Math.round(42 * DefaultStyle.dp)
indicatorColor: DefaultStyle.main2_100
Layout.alignment: Qt.AlignHCenter
indicatorHeight: 42 * DefaultStyle.dp
indicatorWidth: 42 * DefaultStyle.dp
indicatorHeight: Math.round(42 * DefaultStyle.dp)
indicatorWidth: Math.round(42 * DefaultStyle.dp)
}
Text {
Layout.preferredHeight: 27 * DefaultStyle.dp
Layout.topMargin: 15 * DefaultStyle.dp // (84-27)-42
Layout.preferredHeight: Math.round(27 * DefaultStyle.dp)
Layout.topMargin: Math.round(15 * DefaultStyle.dp) // (84-27)-42
text: qsTr('rejoint...')
color: DefaultStyle.grey_0
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
font {
pixelSize: 20 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
}
ColumnLayout {
anchors.centerIn: parent
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
visible: mainItem.remoteIsPaused
EffectImage {
imageSource: AppIcons.pause
@ -153,8 +153,8 @@ Item {
Layout.alignment: Qt.AlignHCenter
text: qsTr("En pause")
font {
pixelSize: 20 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
@ -162,7 +162,7 @@ Item {
spacing: 0
visible: mainItem.displayAll && !mainItem.remoteIsPaused && !mainItem.conference
anchors.top: centerItem.bottom
anchors.topMargin: 21 * DefaultStyle.dp
anchors.topMargin: Math.round(21 * DefaultStyle.dp)
anchors.left: parent.left
anchors.right: parent.right
Text {
@ -171,8 +171,8 @@ Item {
text: mainItem.displayName
color: DefaultStyle.grey_0
font {
pixelSize: 22 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(22 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
capitalization: Font.Capitalize
}
}
@ -183,8 +183,8 @@ Item {
text: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_text) : _text
color: DefaultStyle.grey_0
font {
pixelSize: 14 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
@ -248,9 +248,9 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.rightMargin: 10 * DefaultStyle.dp
anchors.bottomMargin: 10 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(10 * DefaultStyle.dp)
width: implicitWidth
maximumLineCount: 1
property string _text: mainItem.displayName != ''
@ -261,8 +261,8 @@ Item {
text: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_text) : _text
color: DefaultStyle.grey_0
font {
pixelSize: 14 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
@ -279,22 +279,22 @@ Item {
RowLayout{
anchors.right: parent.right
anchors.top: parent.top
anchors.rightMargin: 8 * DefaultStyle.dp
anchors.topMargin: 8 * DefaultStyle.dp
anchors.rightMargin: Math.round(8 * DefaultStyle.dp)
anchors.topMargin: Math.round(8 * DefaultStyle.dp)
height: 18 * DefaultStyle.dp
height: Math.round(18 * DefaultStyle.dp)
spacing: 0
Rectangle {
id: muteIcon
Layout.preferredWidth: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
Layout.preferredHeight: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
Layout.preferredWidth: Math.min(mainItem.width / 16, Math.round(20 * DefaultStyle.dp))
Layout.preferredHeight: Math.min(mainItem.width / 16, Math.round(20 * DefaultStyle.dp))
visible: mainItem.mutedStatus
color: DefaultStyle.grey_0
radius: width /2
EffectImage {
anchors.centerIn: parent
imageWidth: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
imageHeight: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
imageWidth: Math.min(mainItem.width / 16, Math.round(20 * DefaultStyle.dp))
imageHeight: Math.min(mainItem.width / 16, Math.round(20 * DefaultStyle.dp))
imageSource: AppIcons.microphoneSlash
colorizationColor: DefaultStyle.main2_500main
}

View file

@ -20,8 +20,8 @@ Text {
}
}
font {
pixelSize: 13 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Typography.b3.pixelSize
weight: Typography.b3.weight
}
Timer {
id: autoHideErrorMessage

View file

@ -8,8 +8,8 @@ Quick.Text {
width: txtMeter.advanceWidth
font {
family: DefaultStyle.defaultFont
pixelSize: 10 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Math.round(10 * DefaultStyle.dp)
weight: Typography.p1.weight
bold: true
}
color: DefaultStyle.main2_600

View file

@ -10,7 +10,7 @@ Control.ToolTip {
id: tooltipBackground
opacity: 0.7
color: DefaultStyle.main2_200
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
}
contentItem: Text {
text: mainItem.text

View file

@ -12,15 +12,15 @@ FocusScope {
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 16 * DefaultStyle.dp
anchors.bottomMargin: 16 * DefaultStyle.dp
anchors.leftMargin: 17 * DefaultStyle.dp
anchors.rightMargin: 17 * DefaultStyle.dp
spacing: 12 * DefaultStyle.dp
anchors.topMargin: Math.round(16 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
spacing: Math.round(12 * DefaultStyle.dp)
// Text {
// Layout.fillWidth: true
// text: qsTr("La disposition choisie sera enregistrée pour vos prochaines réunions")
// font.pixelSize: 14 * DefaultStyle.dp
// font.pixelSize: Math.round(14 * DefaultStyle.dp)
// color: DefaultStyle.main2_500main
// }
RoundedPane {
@ -37,9 +37,9 @@ FocusScope {
id: radiobutton
checkOnClick: false
color: DefaultStyle.main1_500_main
indicatorSize: 20 * DefaultStyle.dp
indicatorSize: Math.round(20 * DefaultStyle.dp)
leftPadding: indicator.width + spacing
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
checkable: false // Qt Documentation is wrong: It is true by default. We don't want to change the checked state if the layout change is not effective.
checked: index == 0
? mainItem.conferenceLayout === LinphoneEnums.ConferenceLayout.Grid
@ -49,11 +49,11 @@ FocusScope {
onClicked: mainItem.changeLayoutRequested(index)
contentItem: RowLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
EffectImage {
id: radioButtonImg
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
imageSource: modelData.imgUrl
colorizationColor: DefaultStyle.main2_500main
}
@ -61,7 +61,7 @@ FocusScope {
text: modelData.text
color: DefaultStyle.main2_500main
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
Layout.fillWidth: true
}
}
@ -71,4 +71,4 @@ FocusScope {
}
Item {Layout.fillHeight: true}
}
}
}

View file

@ -7,18 +7,18 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
ColumnLayout {
id: mainItem
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
FormItemLayout {
id: username
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
label: qsTr("Nom d'utilisateur")
mandatory: true
enableErrorText: true
contentItem: TextField {
id: usernameEdit
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
isError: username.errorTextVisible || (errorText.isVisible && text.length > 0)
}
}
@ -26,14 +26,14 @@ ColumnLayout {
Layout.preferredHeight: password.implicitHeight
FormItemLayout {
id: password
width: 346 * DefaultStyle.dp
width: Math.round(346 * DefaultStyle.dp)
label: qsTr("Mot de passe")
mandatory: true
enableErrorText: true
contentItem: TextField {
id: passwordEdit
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
isError: password.errorTextVisible || (errorText.isVisible && text.length > 0)
hidden: true
}
@ -53,8 +53,8 @@ ColumnLayout {
}
RowLayout {
Layout.topMargin: 7 * DefaultStyle.dp
spacing: 29 * DefaultStyle.dp
Layout.topMargin: Math.round(7 * DefaultStyle.dp)
spacing: Math.round(29 * DefaultStyle.dp)
BigButton {
id: connectionButton
style: ButtonStyle.main
@ -67,8 +67,8 @@ ColumnLayout {
verticalAlignment: Text.AlignVCenter
font {
pixelSize: 18 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Typography.b1.pixelSize
weight: Typography.b1.weight
}
color: DefaultStyle.grey_0
}

View file

@ -11,30 +11,30 @@ ColumnLayout {
property var call
RoundedPane {
Layout.fillWidth: true
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
topPadding: 13 * DefaultStyle.dp
bottomPadding: 13 * DefaultStyle.dp
leftPadding: Math.round(16 * DefaultStyle.dp)
rightPadding: Math.round(16 * DefaultStyle.dp)
topPadding: Math.round(13 * DefaultStyle.dp)
bottomPadding: Math.round(13 * DefaultStyle.dp)
contentItem: ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
Text {
text: qsTr("Chiffrement :")
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Typography.p2.weight
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 7 * DefaultStyle.dp
spacing: Math.round(7 * DefaultStyle.dp)
Text {
property bool isPostQuantum: mainItem.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp && mainItem.call.core.zrtpStats.isPostQuantum
text: qsTr("Chiffrement du média : %1%2").arg(isPostQuantum ? "post Quantum " : "").arg(mainItem.call.core.encryptionString)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
ColumnLayout {
@ -43,40 +43,40 @@ ColumnLayout {
text: qsTr("Cipher algorithm : %1").arg(mainItem.call && mainItem.call.core.zrtpStats.cipherAlgo)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: qsTr("Key agreement algorithm : %1").arg(mainItem.call && mainItem.call.core.zrtpStats.keyAgreementAlgo)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: qsTr("Hash algorithm : %1").arg(mainItem.call && mainItem.call.core.zrtpStats.hashAlgo)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: qsTr("Authentication algorithm : %1").arg(mainItem.call && mainItem.call.core.zrtpStats.authenticationAlgo)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
Text {
text: qsTr("SAS algorithm : %1").arg(mainItem.call && mainItem.call.core.zrtpStats.sasAlgo)
Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
@ -89,9 +89,9 @@ ColumnLayout {
Layout.fillWidth: true
text: qsTr("Validation chiffrement")
onClicked: mainItem.encryptionValidationRequested()
Layout.bottomMargin: 13 * DefaultStyle.dp
Layout.leftMargin: 16 * DefaultStyle.dp
Layout.rightMargin: 16 * DefaultStyle.dp
Layout.bottomMargin: Math.round(13 * DefaultStyle.dp)
Layout.leftMargin: Math.round(16 * DefaultStyle.dp)
Layout.rightMargin: Math.round(16 * DefaultStyle.dp)
style: ButtonStyle.main
}
}
}

View file

@ -13,31 +13,31 @@ ColumnLayout {
property string microDevice: inputAudioDeviceCBox.currentText
property bool ringerDevicesVisible: false
property bool backgroundVisible: true
spacing: 40 * DefaultStyle.dp
spacing: Math.round(40 * DefaultStyle.dp)
RoundedPane {
background.visible: mainItem.backgroundVisible
Layout.alignment: Qt.AlignHCenter
height: contentItem.implicitHeight + topPadding + bottomPadding
Layout.fillWidth: true
topPadding: background.visible ? 25 * DefaultStyle.dp : 0
bottomPadding: background.visible ? 25 * DefaultStyle.dp : 0
leftPadding: background.visible ? 25 * DefaultStyle.dp : 0
rightPadding: background.visible ? 25 * DefaultStyle.dp : 0
topPadding: background.visible ? Math.round(25 * DefaultStyle.dp) : 0
bottomPadding: background.visible ? Math.round(25 * DefaultStyle.dp) : 0
leftPadding: background.visible ? Math.round(25 * DefaultStyle.dp) : 0
rightPadding: background.visible ? Math.round(25 * DefaultStyle.dp) : 0
contentItem: ColumnLayout {
spacing: mainItem.spacing
ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
visible: mainItem.ringerDevicesVisible
RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.bellRinger
colorizationColor: DefaultStyle.main1_500_main
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
imageWidth: 24 * DefaultStyle.dp
imageHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
imageWidth: Math.round(24 * DefaultStyle.dp)
imageHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
text: qsTr("Sonnerie - Appels entrants")
@ -48,7 +48,7 @@ ColumnLayout {
}
ComboSetting {
Layout.fillWidth: true
Layout.topMargin: 12 * DefaultStyle.dp
Layout.topMargin: Math.round(12 * DefaultStyle.dp)
Layout.preferredWidth: parent.width
entries: SettingsCpp.ringerDevices
propertyName: "ringerDevice"
@ -60,16 +60,16 @@ ColumnLayout {
}
}
ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.speaker
colorizationColor: DefaultStyle.main1_500_main
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
imageWidth: 24 * DefaultStyle.dp
imageHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
imageWidth: Math.round(24 * DefaultStyle.dp)
imageHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
text: qsTr("Haut-parleurs")
@ -81,7 +81,7 @@ ColumnLayout {
id: outputAudioDeviceCBox
Layout.fillWidth: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
entries: SettingsCpp.playbackDevices
propertyName: "playbackDevice"
propertyOwner: SettingsCpp
@ -107,16 +107,16 @@ ColumnLayout {
}
}
ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.microphone
colorizationColor: DefaultStyle.main1_500_main
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
imageWidth: 24 * DefaultStyle.dp
imageHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
imageWidth: Math.round(24 * DefaultStyle.dp)
imageHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
text: qsTr("Microphone")
@ -128,7 +128,7 @@ ColumnLayout {
id: inputAudioDeviceCBox
Layout.fillWidth: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
entries: SettingsCpp.captureDevices
propertyName: "captureDevice"
propertyOwner: SettingsCpp
@ -165,16 +165,16 @@ ColumnLayout {
id: audioTestSlider
Layout.fillWidth: true
enabled: false
Layout.preferredHeight: 10 * DefaultStyle.dp
Layout.preferredHeight: Math.round(10 * DefaultStyle.dp)
background: Rectangle {
x: audioTestSlider.leftPadding
y: audioTestSlider.topPadding + audioTestSlider.availableHeight / 2 - height / 2
implicitWidth: 200 * DefaultStyle.dp
implicitHeight: 10 * DefaultStyle.dp
implicitWidth: Math.round(200 * DefaultStyle.dp)
implicitHeight: Math.round(10 * DefaultStyle.dp)
width: audioTestSlider.availableWidth
height: implicitHeight
radius: 2 * DefaultStyle.dp
radius: Math.round(2 * DefaultStyle.dp)
color: DefaultStyle.grey_850
Rectangle {
@ -185,24 +185,24 @@ ColumnLayout {
GradientStop { position: 0.0; color: DefaultStyle.vue_meter_light_green }
GradientStop { position: 1.0; color: DefaultStyle.vue_meter_dark_green}
}
radius: 2 * DefaultStyle.dp
radius: Math.round(2 * DefaultStyle.dp)
}
}
handle: Item {visible: false}
}
}
ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
visible: SettingsCpp.videoEnabled
RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.videoCamera
colorizationColor: DefaultStyle.main1_500_main
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
imageWidth: 24 * DefaultStyle.dp
imageHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
imageWidth: Math.round(24 * DefaultStyle.dp)
imageHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
text: qsTr("Caméra")
@ -214,7 +214,7 @@ ColumnLayout {
id: videoDevicesCbox
Layout.fillWidth: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
entries: SettingsCpp.videoDevices
propertyName: "videoDevice"
propertyOwner: SettingsCpp

View file

@ -14,19 +14,19 @@ ColumnLayout {
property bool isLocalScreenSharing : conference?.core.isLocalScreenSharing || false
property bool screenSharingAvailable: !!conference && (!conference.core.isScreenSharingEnabled || isLocalScreenSharing)
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
onIsLocalScreenSharingChanged: {if(isLocalScreenSharing) mainItem.call.core.videoSourceDescriptor = mainItem.desc }
Text {
Layout.fillWidth: true
text: qsTr("Veuillez choisir lécran ou la fenêtre que vous souihaitez partager au autres participants")
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
color: DefaultStyle.main2_500main
}
TabBar {
Layout.fillWidth: true
id: bar
pixelSize: 16 * DefaultStyle.dp
pixelSize: Math.round(16 * DefaultStyle.dp)
model: [qsTr("Ecran entier"), qsTr("Fenêtre")]
}
component ScreenPreviewLayout: Control.Control {
@ -36,19 +36,19 @@ ColumnLayout {
property int screenIndex
property bool selected: false
property bool displayScreen: true
property int horizontalMargin: 0
leftPadding: 18 * DefaultStyle.dp
rightPadding: 18 * DefaultStyle.dp
topPadding: 13 * DefaultStyle.dp
bottomPadding: 13 * DefaultStyle.dp
property real horizontalMargin: 0
leftPadding: Math.round(18 * DefaultStyle.dp)
rightPadding: Math.round(18 * DefaultStyle.dp)
topPadding: Math.round(13 * DefaultStyle.dp)
bottomPadding: Math.round(13 * DefaultStyle.dp)
background: Rectangle {
anchors.fill: parent
anchors.leftMargin: screenPreview.horizontalMargin
anchors.rightMargin: screenPreview.horizontalMargin
color: screenPreview.selected ? DefaultStyle.main2_100 : DefaultStyle.grey_0
border.width: 2 * DefaultStyle.dp
border.width: Math.round(2 * DefaultStyle.dp)
border.color: screenPreview.selected ? DefaultStyle.main2_400 : DefaultStyle.main2_200
radius: 10 * DefaultStyle.dp
radius: Math.round(10 * DefaultStyle.dp)
MouseArea {
anchors.fill: parent
onClicked: {
@ -63,7 +63,7 @@ ColumnLayout {
Layout.fillHeight: true
Image {
anchors.centerIn: parent
//Layout.preferredHeight: 170 * DefaultStyle.dp
//Layout.preferredHeight: Math.round(170 * DefaultStyle.dp)
source: $modelData?.windowId ? "image://window/"+ $modelData.windowId : "image://screen/"+ $modelData.screenIndex
sourceSize.width: parent.width
sourceSize.height: parent.height
@ -71,11 +71,11 @@ ColumnLayout {
}
}
RowLayout{
Layout.topMargin: 6 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
Layout.topMargin: Math.round(6 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
Image{
Layout.preferredHeight: 15 * DefaultStyle.dp
Layout.preferredWidth: 15 * DefaultStyle.dp
Layout.preferredHeight: Math.round(15 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(15 * DefaultStyle.dp)
visible: !!$modelData?.windowId
source: visible ? "image://window_icon/"+ $modelData.windowId : ''
sourceSize.width: width
@ -86,7 +86,7 @@ ColumnLayout {
Layout.fillWidth: true
text: !!$modelData?.windowId ? $modelData.name : qsTr("Ecran %1").arg(screenIndex+1)
horizontalAlignment: Text.AlignHCenter
font.pixelSize: (displayScreen ? 14 : 10)* DefaultStyle.dp
font.pixelSize: Math.round((displayScreen ? 14 : 10) * DefaultStyle.dp)
elide: Text.ElideRight
maximumLineCount: 1
}
@ -97,7 +97,7 @@ ColumnLayout {
currentIndex: bar.currentIndex
ListView{
id: screensLayout
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
clip: true
//property int selectedIndex
model: ScreenProxy{
@ -106,9 +106,9 @@ ColumnLayout {
}
onVisibleChanged: if(visible) screensList.update()
delegate: ScreenPreviewLayout {
horizontalMargin: (28 - 20 ) * DefaultStyle.dp // 20 coming from CallsWindow panel
horizontalMargin: Math.round((28 - 20 ) * DefaultStyle.dp) // 20 coming from CallsWindow panel
width: screensLayout.width
height: 219 * DefaultStyle.dp
height: Math.round(219 * DefaultStyle.dp)
screenIndex: index
onClicked: {//screensLayout.selectedIndex = index
screensLayout.currentIndex = index
@ -131,14 +131,14 @@ ColumnLayout {
currentIndex: -1
onVisibleChanged: if(visible) windowsList.update()
cellWidth: width / 2
cellHeight: (112 + 15) * DefaultStyle.dp
cellHeight: Math.round((112 + 15) * DefaultStyle.dp)
clip: true
delegate: Item{
width: windowsLayout.cellWidth
height: windowsLayout.cellHeight
ScreenPreviewLayout {
anchors.fill: parent
anchors.margins: 7 * DefaultStyle.dp
anchors.margins: Math.round(7 * DefaultStyle.dp)
displayScreen: false
screenIndex: index
onClicked: {

View file

@ -40,15 +40,15 @@ ListView {
ColumnLayout {
anchors.fill: parent
property int currentMonth: model.month
spacing: 18 * DefaultStyle.dp
spacing: Math.round(18 * DefaultStyle.dp)
RowLayout {
Layout.fillWidth: true
spacing: 38 * DefaultStyle.dp
spacing: Math.round(38 * DefaultStyle.dp)
Text {
text: UtilsCpp.toDateMonthAndYearString(new Date(model.year, model.month, 15))// 15 because of timezones that can change the date for localeString
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
capitalization: Font.Capitalize
}
}
@ -57,8 +57,8 @@ ListView {
}
Button {
id: previousButton
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
icon.width: width
icon.height: height
style: ButtonStyle.noBackground
@ -67,8 +67,8 @@ ListView {
}
Button {
id: nextButton
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
icon.width: width
icon.height: height
style: ButtonStyle.noBackground
@ -78,7 +78,7 @@ ListView {
}
ColumnLayout {
spacing: 12 * DefaultStyle.dp
spacing: Math.round(12 * DefaultStyle.dp)
Control.DayOfWeekRow {
locale: monthGrid.locale
Layout.column: 1
@ -89,8 +89,8 @@ ListView {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}
@ -146,9 +146,9 @@ ListView {
Rectangle {
anchors.centerIn: parent
width: 30 * DefaultStyle.dp
height: 30 * DefaultStyle.dp
radius: 50 * DefaultStyle.dp
width: Math.round(30 * DefaultStyle.dp)
height: Math.round(30 * DefaultStyle.dp)
radius: Math.round(50 * DefaultStyle.dp)
color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent"
border.width: focusDay.activeFocus || hoveringArea.containsMouse ? 1 : 0
@ -164,8 +164,8 @@ ListView {
? DefaultStyle.main2_700
: DefaultStyle.main2_400
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}

View file

@ -32,7 +32,7 @@ FormItemLayout {
contentItem: TextField {
id: textField
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
placeholderText: useTitleAsPlaceHolder ? mainItem.title : mainItem.placeHolder
initialText: (mainItem.propertyOwnerGui ? mainItem.propertyOwnerGui.core[mainItem.propertyName] : mainItem.propertyOwner[mainItem.propertyName]) || ''
customWidth: mainItem.parent.width

View file

@ -4,7 +4,7 @@ import Linphone
Control.TextField {
id: mainItem
property int inputSize: 100 * DefaultStyle.dp
property real inputSize: Math.round(100 * DefaultStyle.dp)
color: activeFocus ? DefaultStyle.main1_500_main : DefaultStyle.main2_500main
validator: IntValidator{bottom: 0; top: 9}
@ -24,7 +24,7 @@ Control.TextField {
// horizontalAlignment: Control.TextField.AlignHCenter
font.family: DefaultStyle.defaultFont
font.pixelSize: inputSize / 2
font.weight: 300 * DefaultStyle.dp
font.weight: Math.round(300 * DefaultStyle.dp)
background: Item {
anchors.fill: parent
@ -32,7 +32,7 @@ Control.TextField {
// height: mainItem.inputSize
Rectangle {
id: background
border.width: Math.max(DefaultStyle.dp, 1)
border.width: Math.round(Math.max(DefaultStyle.dp), 1)
border.color: mainItem.activeFocus ? DefaultStyle.main1_500_main : DefaultStyle.main2_500main
radius: mainItem.inputSize * 0.15
width: mainItem.inputSize * 0.9
@ -42,11 +42,11 @@ Control.TextField {
id: indicator
visible: mainItem.activeFocus
color: DefaultStyle.main1_500_main
height : Math.max(0.5, 1 * DefaultStyle.dp)
height : Math.max(1, Math.round(1 * DefaultStyle.dp))
width: mainItem.inputSize * 0.67
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: (mainItem.inputSize / 8) * DefaultStyle.dp
anchors.bottomMargin: Math.round((mainItem.inputSize / 8) * DefaultStyle.dp)
}
}
}

View file

@ -90,8 +90,8 @@ FocusScope{
Layout.GridLayout {
id: numPadGrid
columns: 3
columnSpacing: 40 * DefaultStyle.dp
rowSpacing: 10 * DefaultStyle.dp
columnSpacing: (40 * DefaultStyle.dp)
rowSpacing: (10 * DefaultStyle.dp)
function getButtonAt(index){
index = (index+15) % 15
if(index >= 0){
@ -113,8 +113,8 @@ FocusScope{
id: numPadButton
Layout.Layout.alignment: Qt.AlignHCenter
required property int index
implicitWidth: 60 * DefaultStyle.dp
implicitHeight: 60 * DefaultStyle.dp
implicitWidth: (60 * DefaultStyle.dp)
implicitHeight: (60 * DefaultStyle.dp)
onClicked: {
mainItem.buttonPressed(text)
}
@ -123,10 +123,10 @@ FocusScope{
KeyNavigation.up: numPadGrid.getButtonAt(index - 3)
KeyNavigation.down: numPadGrid.getButtonAt(index + 3)
style: ButtonStyle.numericPad
radius: 71 * DefaultStyle.dp
radius: (71 * DefaultStyle.dp)
text: index + 1
textSize: 32 * DefaultStyle.dp
textWeight: 400 * DefaultStyle.dp
textSize: (32 * DefaultStyle.dp)
textWeight: (400 * DefaultStyle.dp)
}
}
Repeater {
@ -139,8 +139,8 @@ FocusScope{
BigButton {
id: digitButton
Layout.Layout.alignment: Qt.AlignHCenter
implicitWidth: 60 * DefaultStyle.dp
implicitHeight: 60 * DefaultStyle.dp
implicitWidth: (60 * DefaultStyle.dp)
implicitHeight: (60 * DefaultStyle.dp)
onClicked: mainItem.buttonPressed(pressText.text)
onPressAndHold: mainItem.buttonPressed(longPressText.text)
@ -149,7 +149,7 @@ FocusScope{
KeyNavigation.right: numPadGrid.getButtonAt((index + 1)+9)
KeyNavigation.up: numPadGrid.getButtonAt((index - 3)+9)
KeyNavigation.down: numPadGrid.getButtonAt((index + 3)+9)
radius: 71 * DefaultStyle.dp
radius: (71 * DefaultStyle.dp)
style: ButtonStyle.numericPad
contentItem: Item {
@ -163,7 +163,7 @@ FocusScope{
horizontalAlignment: Text.AlignHCenter
Component.onCompleted: {if (modelData.longPressText === undefined) anchors.centerIn= parent}
text: modelData.pressText
font.pixelSize: 32 * DefaultStyle.dp
font.pixelSize: (32 * DefaultStyle.dp)
}
Text {
id: longPressText
@ -175,7 +175,7 @@ FocusScope{
horizontalAlignment: Text.AlignHCenter
visible: modelData.longPressText ? modelData.longPressText.length > 0 : false
text: modelData.longPressText ? modelData.longPressText : ""
font.pixelSize: 22 * DefaultStyle.dp
font.pixelSize: (22 * DefaultStyle.dp)
}
}
}
@ -187,12 +187,12 @@ FocusScope{
Button {
id: launchCallButton
visible: mainItem.lastRowVisible
implicitWidth: 75 * DefaultStyle.dp
implicitHeight: 55 * DefaultStyle.dp
implicitWidth: (75 * DefaultStyle.dp)
implicitHeight: (55 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
radius: 71 * DefaultStyle.dp
icon.width: (32 * DefaultStyle.dp)
icon.height: (32 * DefaultStyle.dp)
radius: (71 * DefaultStyle.dp)
style: ButtonStyle.phoneGreen
onClicked: mainItem.launchCall()
@ -205,17 +205,17 @@ FocusScope{
Button {
id: eraseButton
visible: mainItem.lastRowVisible
leftPadding: 5 * DefaultStyle.dp
rightPadding: 5 * DefaultStyle.dp
topPadding: 5 * DefaultStyle.dp
bottomPadding: 5 * DefaultStyle.dp
leftPadding: (5 * DefaultStyle.dp)
rightPadding: (5 * DefaultStyle.dp)
topPadding: (5 * DefaultStyle.dp)
bottomPadding: (5 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
icon.source: AppIcons.backspaceFill
style: ButtonStyle.noBackground
icon.width: 38 * DefaultStyle.dp
icon.height: 38 * DefaultStyle.dp
Layout.Layout.preferredWidth: 38 * DefaultStyle.dp
Layout.Layout.preferredHeight: 38 * DefaultStyle.dp
icon.width: (38 * DefaultStyle.dp)
icon.height: (38 * DefaultStyle.dp)
Layout.Layout.preferredWidth: (38 * DefaultStyle.dp)
Layout.Layout.preferredHeight: (38 * DefaultStyle.dp)
onClicked: mainItem.wipe()

View file

@ -11,7 +11,7 @@ ColumnLayout {
property string placeholderText : ""
property bool mandatory: false
property bool enableErrorText: true
property int textInputWidth: width
property real textInputWidth: width
property string initialPhoneNumber
readonly property string phoneNumber: textField.text
readonly property string countryCode: combobox.currentText
@ -23,8 +23,8 @@ ColumnLayout {
text: mainItem.label + (mainItem.mandatory ? "*" : "")
color: (combobox.hasActiveFocus || textField.hasActiveFocus) ? DefaultStyle.main1_500_main : DefaultStyle.main2_600
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2.pixelSize
weight: Typography.p2.weight
}
}
@ -34,8 +34,8 @@ ColumnLayout {
Rectangle {
id: contentBackground
width: mainItem.textInputWidth
height: 49 * DefaultStyle.dp
radius: 63 * DefaultStyle.dp
height: Math.round(49 * DefaultStyle.dp)
radius: Math.round(63 * DefaultStyle.dp)
color: DefaultStyle.grey_100
border.color: mainItem.errorMessage.length > 0
? DefaultStyle.danger_500main
@ -46,14 +46,14 @@ ColumnLayout {
anchors.fill: parent
CountryIndicatorCombobox {
id: combobox
implicitWidth: 110 * DefaultStyle.dp
implicitWidth: Math.round(110 * DefaultStyle.dp)
defaultCallingCode: mainItem.defaultCallingCode
}
Rectangle {
Layout.preferredWidth: 1 * DefaultStyle.dp
Layout.preferredWidth: Math.max(Math.round(1 * DefaultStyle.dp), 1)
Layout.fillHeight: true
Layout.topMargin: 10 * DefaultStyle.dp
Layout.bottomMargin: 10 * DefaultStyle.dp
Layout.topMargin: Math.round(10 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(10 * DefaultStyle.dp)
color: DefaultStyle.main2_600
}
TextField {
@ -76,7 +76,7 @@ ColumnLayout {
elide: Text.ElideRight
wrapMode: Text.Wrap
font {
pixelSize: 13 * DefaultStyle.dp
pixelSize: Math.round(13 * DefaultStyle.dp)
family: DefaultStyle.defaultFont
bold: true
}

View file

@ -8,7 +8,7 @@ FocusScope {
id: mainItem
property string placeholderText: ""
property color placeholderTextColor: DefaultStyle.main2_400
property int textInputWidth: 350 * DefaultStyle.dp
property real textInputWidth: Math.round(350 * DefaultStyle.dp)
property color borderColor: "transparent"
property color focusedBorderColor: DefaultStyle.main2_500main
property string text: textField.searchText
@ -38,12 +38,12 @@ FocusScope {
implicitWidth: mainItem.textInputWidth
implicitHeight: 50 * DefaultStyle.dp
implicitHeight: Math.round(50 * DefaultStyle.dp)
Rectangle{
id: backgroundItem
anchors.fill: parent
radius: 28 * DefaultStyle.dp
radius: Math.round(28 * DefaultStyle.dp)
color: DefaultStyle.grey_100
border.color: textField.activeFocus ? mainItem.focusedBorderColor : mainItem.borderColor
}
@ -53,15 +53,15 @@ FocusScope {
colorizationColor: DefaultStyle.main2_500main
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
imageSource: AppIcons.magnifier
width: 20 * DefaultStyle.dp
height: 20 * DefaultStyle.dp
width: Math.round(20 * DefaultStyle.dp)
height: Math.round(20 * DefaultStyle.dp)
}
Control.TextField {
id: textField
anchors.left: magnifier.visible ? magnifier.right : parent.left
anchors.leftMargin: magnifier.visible ? 0 : 10 * DefaultStyle.dp
anchors.leftMargin: magnifier.visible ? 0 : Math.round(10 * DefaultStyle.dp)
anchors.right: clearTextButton.left
anchors.verticalCenter: parent.verticalCenter
@ -73,8 +73,8 @@ FocusScope {
width: mainItem.width - dialerButton.width
echoMode: (mainItem.hidden && !dialerButton.checked) ? TextInput.Password : TextInput.Normal
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
family: DefaultStyle.defaultFont
}
color: DefaultStyle.main2_600
@ -87,7 +87,7 @@ FocusScope {
cursorDelegate: Rectangle {
visible: textField.cursorVisible
color: DefaultStyle.main2_500main
width: 1 * DefaultStyle.dp
width: Math.max(Math.round(1 * DefaultStyle.dp), 1)
}
Timer{
id: delayTimer
@ -104,11 +104,11 @@ FocusScope {
icon.source: AppIcons.dialer
contentImageColor: dialerButton.checked ? DefaultStyle.main1_500_main : DefaultStyle.main2_600
hoveredImageColor: contentImageColor
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20 * DefaultStyle.dp
anchors.rightMargin: Math.round(20 * DefaultStyle.dp)
onClicked: {
if(!checked){
mainItem.openNumericPadRequested()
@ -119,14 +119,14 @@ FocusScope {
Button {
id: clearTextButton
visible: textField.text.length > 0 && mainItem.enabled
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
style: ButtonStyle.noBackground
icon.source: AppIcons.closeX
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: 20 * DefaultStyle.dp
anchors.rightMargin: Math.round(20 * DefaultStyle.dp)
onClicked: {
textField.clear()
}

View file

@ -7,14 +7,14 @@ TextEdit {
id: mainItem
property string placeholderText
property int placeholderPixelSize: 14 * DefaultStyle.dp
property int placeholderWeight: 400 * DefaultStyle.dp
property real placeholderPixelSize: Typography.p1.pixelSize
property real placeholderWeight: Typography.p1.weight
property color placeholderTextColor: color
property alias background: background.data
property bool hoverEnabled: false
property bool hovered: mouseArea.hoverEnabled && mouseArea.containsMouse
topPadding: 5 * DefaultStyle.dp
bottomPadding: 5 * DefaultStyle.dp
topPadding: Math.round(5 * DefaultStyle.dp)
bottomPadding: Math.round(5 * DefaultStyle.dp)
activeFocusOnTab: true
MouseArea {

View file

@ -7,12 +7,12 @@ import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle
Control.TextField {
id: mainItem
property var customWidth
width: (customWidth ? customWidth - 1 : 360) * DefaultStyle.dp
height: 49 * DefaultStyle.dp
leftPadding: 15 * DefaultStyle.dp
width: Math.round((customWidth ? customWidth - 1 : 360) * DefaultStyle.dp)
height: Math.round(49 * DefaultStyle.dp)
leftPadding: Math.round(15 * DefaultStyle.dp)
rightPadding: eyeButton.visible
? 5 * DefaultStyle.dp + eyeButton.width + eyeButton.rightMargin
: 15 * DefaultStyle.dp
? Math.round(5 * DefaultStyle.dp) + eyeButton.width + eyeButton.rightMargin
: Math.round(15 * DefaultStyle.dp)
echoMode: (hidden && !eyeButton.checked) ? TextInput.Password : TextInput.Normal
// Workaround for Windows slowness when first typing a password
@ -27,8 +27,8 @@ Control.TextField {
placeholderTextColor: DefaultStyle.placeholders
font {
family: DefaultStyle.defaultFont
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
selectByMouse: true
activeFocusOnTab: true
@ -43,8 +43,8 @@ Control.TextField {
property color disabledBackgroundColor: DefaultStyle.grey_200
property color backgroundBorderColor: DefaultStyle.grey_200
property string initialText
property int pixelSize: 14 * DefaultStyle.dp
property int weight: 400 * DefaultStyle.dp
property real pixelSize: Typography.p1.pixelSize
property real weight: Typography.p1.weight
// fill propertyName and propertyOwner to check text validity
property string propertyName
@ -115,7 +115,7 @@ Control.TextField {
id: inputBackground
visible: mainItem.backgroundVisible
anchors.fill: parent
radius: 79 * DefaultStyle.dp
radius: Math.round(79 * DefaultStyle.dp)
color: mainItem.enabled ? mainItem.backgroundColor : mainItem.disabledBackgroundColor
border.color: mainItem.isError ? DefaultStyle.danger_500main : mainItem.activeFocus ? DefaultStyle.main1_500_main : mainItem.backgroundBorderColor
}
@ -123,7 +123,7 @@ Control.TextField {
cursorDelegate: Rectangle {
id: cursor
color: DefaultStyle.main1_500_main
width: 1 * DefaultStyle.dp
width: Math.max(Math.round(1 * DefaultStyle.dp), 1)
anchors.verticalCenter: mainItem.verticalCenter
SequentialAnimation {
@ -174,14 +174,14 @@ Control.TextField {
Button {
id: eyeButton
KeyNavigation.left: mainItem
property int rightMargin: 15 * DefaultStyle.dp
property real rightMargin: Math.round(15 * DefaultStyle.dp)
z: 1
visible: mainItem.hidden
checkable: true
style: ButtonStyle.noBackground
icon.source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
width: 20 * DefaultStyle.dp
height: 20 * DefaultStyle.dp
width: Math.round(20 * DefaultStyle.dp)
height: Math.round(20 * DefaultStyle.dp)
icon.width: width
icon.height: height
anchors.verticalCenter: parent.verticalCenter

View file

@ -21,10 +21,10 @@ ComboBox {
property alias contentText: input
property var minTime
property var maxTime
popup.width: 73 * DefaultStyle.dp
popup.width: Math.round(73 * DefaultStyle.dp)
listView.model: 48
listView.height: Math.min(204 * DefaultStyle.dp, listView.contentHeight)
popup.height: Math.min(204 * DefaultStyle.dp, listView.contentHeight)
listView.height: Math.min(Math.round(204 * DefaultStyle.dp), listView.contentHeight)
popup.height: Math.min(Math.round(204 * DefaultStyle.dp), listView.contentHeight)
editable: true
popup.closePolicy: Popup.PressOutsideParent | Popup.CloseOnPressOutside
onCurrentTextChanged: input.text = currentText
@ -52,8 +52,8 @@ ComboBox {
}
}
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
text: mainItem.selectedTimeString
Keys.onPressed: (event) => {
@ -74,12 +74,12 @@ ComboBox {
text: Qt.formatDateTime(currentDateTime, "hh:mm")
width: mainItem.width
visible: mainItem.minTime == undefined || UtilsCpp.timeOffset(mainItem.minTime, currentDateTime) > 0
height: visible ? 25 * DefaultStyle.dp : 0
height: visible ? Math.round(25 * DefaultStyle.dp) : 0
verticalAlignment: TextInput.AlignVCenter
horizontalAlignment: TextInput.AlignHCenter
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
MouseArea {
anchors.fill: parent
@ -97,4 +97,4 @@ ComboBox {
}
}
}
}
}

View file

@ -17,11 +17,11 @@ Dialog {
readonly property string password: passwordEdit.text
property var callback// Define cb(var) function
topPadding: 20 * DefaultStyle.dp
bottomPadding: 20 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
width: 637 * DefaultStyle.dp
topPadding:Math.round( 20 * DefaultStyle.dp)
bottomPadding:Math.round( 20 * DefaultStyle.dp)
leftPadding:Math.round( 20 * DefaultStyle.dp)
rightPadding:Math.round( 20 * DefaultStyle.dp)
width:Math.round( 637 * DefaultStyle.dp)
modal: true
closePolicy: Popup.NoAutoClose
@ -33,19 +33,19 @@ Dialog {
Component.onDestruction: if(callback) callback.destroy()
content: ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing:Math.round( 20 * DefaultStyle.dp)
id: contentLayout
Text {
Layout.fillWidth: true
Layout.preferredWidth: 250 * DefaultStyle.dp
Layout.preferredWidth:Math.round( 250 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
text: qsTr("Impossible de vous authentifier. Merci de vérifier votre mot de passe.")
font.pixelSize: 16 * DefaultStyle.dp
font.pixelSize:Math.round( 16 * DefaultStyle.dp)
}
ColumnLayout {
spacing: 10 * DefaultStyle.dp
spacing:Math.round( 10 * DefaultStyle.dp)
FormItemLayout {
Layout.fillWidth: true
label: qsTr("Identité")
@ -90,7 +90,7 @@ Dialog {
buttons: [
MediumButton {
id: cancelButton
Layout.topMargin: 10 * DefaultStyle.dp
Layout.topMargin: Math.round( 10 * DefaultStyle.dp)
text: qsTr("Annuler")
style: ButtonStyle.secondary
onClicked: mainItem.rejected()
@ -99,7 +99,7 @@ Dialog {
},
MediumButton {
id: connectButton
Layout.topMargin: 10 * DefaultStyle.dp
Layout.topMargin:Math.round( 10 * DefaultStyle.dp)
text: qsTr("Se connecter")
style: ButtonStyle.main
KeyNavigation.up: passwordEdit

View file

@ -10,12 +10,12 @@ Popup {
modal: true
anchors.centerIn: parent
closePolicy: Control.Popup.NoAutoClose
leftPadding: title.length === 0 ? 10 * DefaultStyle.dp : 33 * DefaultStyle.dp
rightPadding: title.length === 0 ? 10 * DefaultStyle.dp : 33 * DefaultStyle.dp
topPadding: title.length === 0 ? 10 * DefaultStyle.dp : 37 * DefaultStyle.dp
bottomPadding: title.length === 0 ? 10 * DefaultStyle.dp : 37 * DefaultStyle.dp
leftPadding: title.length === 0 ? Math.round(10 * DefaultStyle.dp) : Math.round(33 * DefaultStyle.dp)
rightPadding: title.length === 0 ? Math.round(10 * DefaultStyle.dp) : Math.round(33 * DefaultStyle.dp)
topPadding: title.length === 0 ? Math.round(10 * DefaultStyle.dp) : Math.round(37 * DefaultStyle.dp)
bottomPadding: title.length === 0 ? Math.round(10 * DefaultStyle.dp) : Math.round(37 * DefaultStyle.dp)
underlineColor: DefaultStyle.main1_500_main
radius: title.length === 0 ? 16 * DefaultStyle.dp : 0
radius: title.length === 0 ? Math.round(16 * DefaultStyle.dp) : 0
property string title
property var titleColor: DefaultStyle.main1_500_main
property string text
@ -47,7 +47,7 @@ Popup {
ColumnLayout {
id: child
anchors.fill: parent
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
Text{
id: titleText
@ -56,8 +56,8 @@ Popup {
text: mainItem.title
color: mainItem.titleColor
font {
pixelSize: 22 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h3.pixelSize
weight: Typography.h3.weight
}
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignLeft
@ -76,8 +76,8 @@ Popup {
Layout.alignment: Qt.AlignCenter
text: mainItem.text
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
wrapMode: Text.Wrap
horizontalAlignment: titleText.visible ? Text.AlignLeft : Text.AlignHCenter
@ -86,12 +86,12 @@ Popup {
id: detailsText
visible: text.length != 0
Layout.fillWidth: true
//Layout.preferredWidth: 278 * DefaultStyle.dp
//Layout.preferredWidth: Math.round(278 * DefaultStyle.dp)
Layout.alignment: Qt.AlignCenter
text: mainItem.details
font {
pixelSize: 13 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
italic: true
}
wrapMode: Text.Wrap
@ -107,7 +107,7 @@ Popup {
RowLayout {
id: buttonsLayout
Layout.alignment: Qt.AlignBottom | ( titleText.visible ? Qt.AlignRight : Qt.AlignHCenter)
spacing: titleText.visible ? 20 * DefaultStyle.dp : 10 * DefaultStyle.dp
spacing: titleText.visible ? Math.round(20 * DefaultStyle.dp) : Math.round(10 * DefaultStyle.dp)
// Default buttons only visible if no other children
// have been set

View file

@ -9,11 +9,11 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
// =============================================================================
Dialog {
id: mainItem
width: 436 * DefaultStyle.dp
rightPadding: 0 * DefaultStyle.dp
leftPadding: 0 * DefaultStyle.dp
topPadding: 85 * DefaultStyle.dp + 24 * DefaultStyle.dp
bottomPadding: 24 * DefaultStyle.dp
width: Math.round(436 * DefaultStyle.dp)
rightPadding: Math.round(0 * DefaultStyle.dp)
leftPadding: Math.round(0 * DefaultStyle.dp)
topPadding: Math.round(85 * DefaultStyle.dp) + Math.round(24 * DefaultStyle.dp)
bottomPadding: Math.round(24 * DefaultStyle.dp)
modal: true
closePolicy: Popup.NoAutoClose
@ -39,10 +39,10 @@ Dialog {
radius: mainItem.radius
Layout.ColumnLayout {
anchors.top: parent.top
anchors.topMargin: 18 * DefaultStyle.dp
anchors.topMargin: Math.round(18 * DefaultStyle.dp)
anchors.horizontalCenter: parent.horizontalCenter
Item {
// spacing: 14 * DefaultStyle.dp
// spacing: Math.round(14 * DefaultStyle.dp)
Layout.Layout.preferredWidth: childrenRect.width
Layout.Layout.preferredHeight: childrenRect.height
Layout.Layout.fillWidth: true
@ -50,19 +50,19 @@ Dialog {
id: trustShield
anchors.centerIn: parent
source: AppIcons.trustedWhite
sourceSize.width: 24 * DefaultStyle.dp
sourceSize.height: 24 * DefaultStyle.dp
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
sourceSize.width: Math.round(24 * DefaultStyle.dp)
sourceSize.height: Math.round(24 * DefaultStyle.dp)
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
}
EffectImage {
anchors.left: trustShield.right
anchors.leftMargin: 14 * DefaultStyle.dp
anchors.leftMargin: Math.round(14 * DefaultStyle.dp)
visible: mainItem.securityError
imageSource: AppIcons.shieldWarning
colorizationColor: DefaultStyle.main2_700
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
}
}
Text {
@ -70,8 +70,8 @@ Dialog {
color: DefaultStyle.grey_0
Layout.Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
}
Item{Layout.Layout.fillHeight: true}
@ -80,8 +80,8 @@ Dialog {
visible: !mainItem.securityError
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 10 * DefaultStyle.dp
anchors.rightMargin: 17 * DefaultStyle.dp
anchors.topMargin: Math.round(10 * DefaultStyle.dp)
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
style: ButtonStyle.noBackground
text: qsTr("Passer")
textColor: DefaultStyle.grey_0
@ -97,9 +97,9 @@ Dialog {
Rectangle {
z: 1
width: mainItem.width
height: parent.height - 85 * DefaultStyle.dp
height: parent.height - Math.round(85 * DefaultStyle.dp)
x: parent.x
y: parent.y + 85 * DefaultStyle.dp
y: parent.y + Math.round(85 * DefaultStyle.dp)
color: DefaultStyle.grey_0
radius: mainItem.radius
}
@ -116,21 +116,21 @@ Dialog {
content: [
Layout.ColumnLayout {
visible: !mainItem.securityError
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
Layout.Layout.fillWidth: true
Layout.ColumnLayout {
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
Text {
Layout.Layout.preferredWidth: 343 * DefaultStyle.dp
Layout.Layout.preferredWidth: Math.round(343 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: !mainItem.isTokenVerified && mainItem.isCaseMismatch
? qsTr("Pour garantir le chiffrement, nous avons besoin de réauthentifier lappareil de votre correspondant. Echangez vos codes :")
: qsTr("Pour garantir le chiffrement, nous avons besoin dauthentifier lappareil de votre correspondant. Veuillez échanger vos codes : ")
wrapMode: Text.WordWrap
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
}
Layout.ColumnLayout {
spacing: 0
@ -139,15 +139,15 @@ Dialog {
text: qsTr("Votre code :")
horizontalAlignment: Text.AlignHCenter
Layout.Layout.alignment: Qt.AlignHCenter
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
}
Text {
text: mainItem.call && mainItem.call.core.localToken || ""
horizontalAlignment: Text.AlignHCenter
Layout.Layout.alignment: Qt.AlignHCenter
font {
pixelSize: 18 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.b1.pixelSize
weight: Typography.b1.weight
}
}
}
@ -155,17 +155,17 @@ Dialog {
Rectangle {
color: "transparent"
border.color: DefaultStyle.main2_200
border.width: Math.max(0.5, 1 * DefaultStyle.dp)
radius: 15 * DefaultStyle.dp
Layout.Layout.preferredWidth: 292 * DefaultStyle.dp
Layout.Layout.preferredHeight: 233 * DefaultStyle.dp
border.width: Math.max(1, Math.round(1 * DefaultStyle.dp))
radius: Math.round(15 * DefaultStyle.dp)
Layout.Layout.preferredWidth: Math.round(292 * DefaultStyle.dp)
Layout.Layout.preferredHeight: Math.round(233 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
Layout.ColumnLayout {
anchors.fill: parent
anchors.topMargin: 10 * DefaultStyle.dp
anchors.topMargin: Math.round(10 * DefaultStyle.dp)
Text {
text: qsTr("Code correspondant :")
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
}
Layout.GridLayout {
@ -173,22 +173,22 @@ Dialog {
Layout.Layout.alignment: Qt.AlignHCenter
rows: 2
columns: 2
rowSpacing: 32 * DefaultStyle.dp
columnSpacing: 32 * DefaultStyle.dp
rowSpacing: Math.round(32 * DefaultStyle.dp)
columnSpacing: Math.round(32 * DefaultStyle.dp)
property var correctIndex
property var modelList
Repeater {
model: mainItem.call && mainItem.call.core.remoteTokens || ""
Button {
Layout.Layout.preferredWidth: 70 * DefaultStyle.dp
Layout.Layout.preferredHeight: 70 * DefaultStyle.dp
width: 70 * DefaultStyle.dp
height: 70 * DefaultStyle.dp
Layout.Layout.preferredWidth: Math.round(70 * DefaultStyle.dp)
Layout.Layout.preferredHeight: Math.round(70 * DefaultStyle.dp)
width: Math.round(70 * DefaultStyle.dp)
height: Math.round(70 * DefaultStyle.dp)
color: DefaultStyle.grey_0
textSize: 32 * DefaultStyle.dp
textWeight: 400 * DefaultStyle.dp
textSize: Math.round(32 * DefaultStyle.dp)
textWeight: Math.round(400 * DefaultStyle.dp)
text: modelData
radius: 71 * DefaultStyle.dp
radius: Math.round(71 * DefaultStyle.dp)
textColor: DefaultStyle.main2_600
onClicked: {
console.log("CHECK TOKEN", modelData)
@ -205,24 +205,24 @@ Dialog {
spacing: 0
Text {
width: 303 * DefaultStyle.dp
// Layout.Layout.preferredWidth: 343 * DefaultStyle.dp
width: Math.round(303 * DefaultStyle.dp)
// Layout.Layout.preferredWidth: Math.round(343 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
Layout.Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
text: qsTr("Le code fourni ne correspond pas.")
wrapMode: Text.WordWrap
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
}
Text {
width: 303 * DefaultStyle.dp
// Layout.Layout.preferredWidth: 343 * DefaultStyle.dp
width: Math.round(303 * DefaultStyle.dp)
// Layout.Layout.preferredWidth: Math.round(343 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
Layout.Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
text: qsTr("La confidentialité de votre appel peut être compromise !")
wrapMode: Text.WordWrap
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
}
}
]
@ -231,7 +231,7 @@ Dialog {
Layout.Layout.alignment: Qt.AlignHCenter
MediumButton {
Layout.Layout.alignment: Qt.AlignHCenter
Layout.Layout.preferredWidth: 247 * DefaultStyle.dp
Layout.Layout.preferredWidth: Math.round(247 * DefaultStyle.dp)
text: qsTr("Aucune correspondance")
color: DefaultStyle.grey_0
borderColor: DefaultStyle.danger_500main
@ -242,13 +242,13 @@ Dialog {
}
}
MediumButton {
Layout.Layout.preferredWidth: 247 * DefaultStyle.dp
Layout.Layout.preferredWidth: Math.round(247 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter
visible: mainItem.securityError
style: ButtonStyle.phoneRed
onClicked: mainItem.call.core.lTerminate()
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
text: qsTr("Raccrocher")
}
}
}
}

View file

@ -18,9 +18,9 @@ Popup {
closePolicy: Popup.NoAutoClose
x : parent.x + parent.width - width
// y : parent.y + parent.height - height
rightMargin: 20 * DefaultStyle.dp
bottomMargin: 20 * DefaultStyle.dp
padding: 20 * DefaultStyle.dp
rightMargin: Math.round(20 * DefaultStyle.dp)
bottomMargin: Math.round(20 * DefaultStyle.dp)
padding: Math.round(20 * DefaultStyle.dp)
underlineColor: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
radius: 0
onHoveredChanged: {
@ -35,22 +35,22 @@ Popup {
}
}
contentItem: RowLayout {
spacing: 24 * DefaultStyle.dp
spacing: Math.round(24 * DefaultStyle.dp)
EffectImage {
imageSource: mainItem.isSuccess ? AppIcons.smiley : AppIcons.smileySad
colorizationColor: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
width: 32 * DefaultStyle.dp
height: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
width: Math.round(32 * DefaultStyle.dp)
height: Math.round(32 * DefaultStyle.dp)
}
Rectangle {
Layout.preferredWidth: 1 * DefaultStyle.dp
Layout.preferredWidth: Math.max(Math.round(1 * DefaultStyle.dp), 1)
Layout.preferredHeight: parent.height
color: DefaultStyle.main2_200
}
ColumnLayout {
spacing: 2 * DefaultStyle.dp
spacing: Math.round(2 * DefaultStyle.dp)
RowLayout {
spacing: 0
Text {
@ -58,15 +58,15 @@ Popup {
text: mainItem.title
color: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h4.pixelSize
weight: Typography.h4.weight
}
}
Button {
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
icon.width: 20 * DefaultStyle.dp
icon.height: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
icon.width: Math.round(20 * DefaultStyle.dp)
icon.height: Math.round(20 * DefaultStyle.dp)
Layout.alignment: Qt.AlignTop | Qt.AlignRight
visible: mainItem.hovered || hovered
style: ButtonStyle.noBackground
@ -77,13 +77,13 @@ Popup {
Text {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.maximumWidth: 300 * DefaultStyle.dp
Layout.maximumWidth: Math.round(300 * DefaultStyle.dp)
text: mainItem.description
wrapMode: Text.WordWrap
color: DefaultStyle.main2_500main
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(300 * DefaultStyle.dp)
}
}
}

View file

@ -12,18 +12,18 @@ Popup {
modal: true
closePolicy: Control.Popup.NoAutoClose
anchors.centerIn: parent
padding: 20 * DefaultStyle.dp
padding: Math.round(20 * DefaultStyle.dp)
underlineColor: DefaultStyle.main1_500_main
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
// onAboutToShow: width = contentText.implicitWidth
contentItem: ColumnLayout {
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
// width: childrenRect.width
// height: childrenRect.height
BusyIndicator{
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 33 * DefaultStyle.dp
Layout.preferredHeight: 33 * DefaultStyle.dp
Layout.preferredWidth: Math.round(33 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(33 * DefaultStyle.dp)
}
Text {
id: contentText
@ -31,7 +31,7 @@ Popup {
Layout.fillWidth: true
Layout.fillHeight: true
text: mainItem.text
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
}
MediumButton {
visible: mainItem.cancelButtonVisible

View file

@ -11,8 +11,8 @@ DesktopPopup {
property var notificationData: ({
timelineModel : null
})
property int overriddenHeight: 120 * DefaultStyle.dp
property int overriddenWidth: 300 * DefaultStyle.dp
property real overriddenHeight: Math.round(120 * DefaultStyle.dp)
property real overriddenWidth: Math.round(300 * DefaultStyle.dp)
property double radius: 0
property color backgroundColor: DefaultStyle.grey_0
property double backgroundOpacity: 1
@ -56,7 +56,7 @@ DesktopPopup {
opacity: mainItem.backgroundOpacity
// border {
// color: DefaultStyle.grey_400
// width: 1 * DefaultStyle.dp
// width: Math.round(1 * DefaultStyle.dp)
// }
}
MultiEffect {

View file

@ -8,10 +8,10 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
Notification {
id: mainItem
radius: 20 * DefaultStyle.dp
radius: Math.round(20 * DefaultStyle.dp)
backgroundColor: DefaultStyle.grey_600
backgroundOpacity: 0.8
overriddenWidth: 400 * DefaultStyle.dp
overriddenWidth: Math.round(400 * DefaultStyle.dp)
overriddenHeight: content.height
readonly property var call: notificationData && notificationData.call
@ -29,41 +29,41 @@ Notification {
Popup {
id: content
visible: mainItem.visible
leftPadding: 32 * DefaultStyle.dp
rightPadding: 32 * DefaultStyle.dp
topPadding: 9 * DefaultStyle.dp
bottomPadding: 18 * DefaultStyle.dp
leftPadding: Math.round(32 * DefaultStyle.dp)
rightPadding: Math.round(32 * DefaultStyle.dp)
topPadding: Math.round(9 * DefaultStyle.dp)
bottomPadding: Math.round(18 * DefaultStyle.dp)
anchors.centerIn: parent
background: Item{}
contentItem: ColumnLayout {
anchors.verticalCenter: parent.verticalCenter
spacing: 9 * DefaultStyle.dp
spacing: Math.round(9 * DefaultStyle.dp)
RowLayout {
spacing: 4 * DefaultStyle.dp
spacing: Math.round(4 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Image {
Layout.preferredWidth: 12 * DefaultStyle.dp
Layout.preferredHeight: 12 * DefaultStyle.dp
Layout.preferredWidth: Math.round(12 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(12 * DefaultStyle.dp)
source: AppIcons.logo
}
Text {
text: "Linphone"
color: DefaultStyle.grey_0
font {
pixelSize: 12 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Typography.b3.weight
capitalization: Font.Capitalize
}
}
}
ColumnLayout {
spacing: 17 * DefaultStyle.dp
spacing: Math.round(17 * DefaultStyle.dp)
ColumnLayout {
spacing: 14 * DefaultStyle.dp
spacing: Math.round(14 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
Avatar {
Layout.preferredWidth: 60 * DefaultStyle.dp
Layout.preferredHeight: 60 * DefaultStyle.dp
Layout.preferredWidth: Math.round(60 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(60 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
call: mainItem.call
isConference: mainItem.call && mainItem.call.core.isConference
@ -73,14 +73,14 @@ Notification {
Text {
text: call.core.remoteName
Layout.fillWidth: true
Layout.maximumWidth: (mainItem.width - content.leftPadding - content.rightPadding) * DefaultStyle.dp
Layout.maximumWidth: mainItem.width - content.leftPadding - content.rightPadding
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
maximumLineCount: 1
color: DefaultStyle.grey_0
font {
pixelSize: 20 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Typography.b3.weight
capitalization: Font.Capitalize
}
}
@ -89,8 +89,8 @@ Notification {
Layout.alignment: Qt.AlignHCenter
color: DefaultStyle.grey_0
font {
pixelSize: 14 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
weight: Math.round(500 * DefaultStyle.dp)
}
}
}
@ -98,18 +98,18 @@ Notification {
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
spacing: 26 * DefaultStyle.dp
spacing: Math.round(26 * DefaultStyle.dp)
Button {
spacing: 6 * DefaultStyle.dp
spacing: Math.round(6 * DefaultStyle.dp)
style: ButtonStyle.phoneGreen
Layout.preferredWidth: 118 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(118 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
asynchronous: false
icon.width: 19 * DefaultStyle.dp
icon.height: 19 * DefaultStyle.dp
icon.width: Math.round(19 * DefaultStyle.dp)
icon.height: Math.round(19 * DefaultStyle.dp)
text: qsTr("Répondre")
textSize: 14 * DefaultStyle.dp
textWeight: 500 * DefaultStyle.dp
textSize: Math.round(14 * DefaultStyle.dp)
textWeight: Math.round(500 * DefaultStyle.dp)
onClicked: {
console.debug("[NotificationReceivedCall] Accept click")
UtilsCpp.openCallsWindow(mainItem.call)
@ -117,16 +117,16 @@ Notification {
}
}
Button {
spacing: 6 * DefaultStyle.dp
spacing: Math.round(6 * DefaultStyle.dp)
style: ButtonStyle.phoneRed
Layout.preferredWidth: 118 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(118 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
asynchronous: false
icon.width: 19 * DefaultStyle.dp
icon.height: 19 * DefaultStyle.dp
icon.width: Math.round(19 * DefaultStyle.dp)
icon.height: Math.round(19 * DefaultStyle.dp)
text: qsTr("Refuser")
textSize: 14 * DefaultStyle.dp
textWeight: 500 * DefaultStyle.dp
textSize: Math.round(14 * DefaultStyle.dp)
textWeight: Math.round(500 * DefaultStyle.dp)
onClicked: {
console.debug("[NotificationReceivedCall] Decline click")
mainItem.call.core.lDecline()

View file

@ -4,13 +4,13 @@ import Linphone
Control.Control {
id: mainItem
// width: 269 * DefaultStyle.dp
// width: Math.round(269 * DefaultStyle.dp)
y: -height
z: 1
topPadding: 8 * DefaultStyle.dp
bottomPadding: 8 * DefaultStyle.dp
leftPadding: 37 * DefaultStyle.dp
rightPadding: 37 * DefaultStyle.dp
topPadding: Math.round(8 * DefaultStyle.dp)
bottomPadding: Math.round(8 * DefaultStyle.dp)
leftPadding: Math.round(37 * DefaultStyle.dp)
rightPadding: Math.round(37 * DefaultStyle.dp)
anchors.horizontalCenter: parent.horizontalCenter
clip: true
@ -41,15 +41,15 @@ Control.Control {
anchors.fill: parent
color: DefaultStyle.grey_0
border.color: mainItem.contentColor
border.width: 1 * DefaultStyle.dp
radius: 50 * DefaultStyle.dp
border.width: Math.max(Math.round(1 * DefaultStyle.dp), 1)
radius: Math.round(50 * DefaultStyle.dp)
}
contentItem: RowLayout {
Image {
visible: mainItem.imageSource != undefined
source: mainItem.imageSource
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
Layout.fillWidth: true
}
@ -58,8 +58,8 @@ Control.Control {
text: mainItem.text
Layout.fillWidth: true
font {
pixelSize: 14 * DefaultStyle.dp
pixelSize: Math.round(14 * DefaultStyle.dp)
}
}
}
}
}

View file

@ -9,10 +9,10 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
Control.Popup {
id: mainItem
closePolicy: Control.Popup.CloseOnEscape
leftPadding: 72 * DefaultStyle.dp
rightPadding: 72 * DefaultStyle.dp
topPadding: 41 * DefaultStyle.dp
bottomPadding: 18 * DefaultStyle.dp
leftPadding: Math.round(72 * DefaultStyle.dp)
rightPadding: Math.round(72 * DefaultStyle.dp)
topPadding: Math.round(41 * DefaultStyle.dp)
bottomPadding: Math.round(18 * DefaultStyle.dp)
property bool closeButtonVisible: true
property bool roundedBottom: false
property bool lastRowVisible: true
@ -29,7 +29,7 @@ Control.Popup {
width: parent.width
height: parent.height
color: DefaultStyle.grey_100
radius: 20 * DefaultStyle.dp
radius: Math.round(20 * DefaultStyle.dp)
}
MultiEffect {
id: effect
@ -57,11 +57,11 @@ Control.Popup {
visible: mainItem.closeButtonVisible
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 10 * DefaultStyle.dp
anchors.rightMargin: 10 * DefaultStyle.dp
anchors.topMargin: Math.round(10 * DefaultStyle.dp)
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
icon.source: AppIcons.closeX
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
style: ButtonStyle.noBackground
onClicked: mainItem.close()
}

View file

@ -7,14 +7,14 @@ Control.Popup{
id: mainItem
padding: 0
property color underlineColor : DefaultStyle.main1_500_main
property int radius: 16 * DefaultStyle.dp
property real radius: Math.round(16 * DefaultStyle.dp)
property bool hovered: mouseArea.containsMouse
background: Item{
Rectangle {
visible: mainItem.underlineColor != undefined
width: mainItem.width
height: mainItem.height + 2 * DefaultStyle.dp
height: mainItem.height + Math.round(2 * DefaultStyle.dp)
color: mainItem.underlineColor
radius: mainItem.radius
}

View file

@ -13,7 +13,7 @@ MouseArea{
yClicked = mouseY
}
}
property int margin: 0
property real margin: 0
// Position buffer
property int xClicked : 0
property int yClicked : 0

View file

@ -129,7 +129,7 @@ Window {
TextField {
id: usernameToCall
label: "Username to call"
Layout.preferredWidth: 250 * DefaultStyle.dp
Layout.preferredWidth: Math.round(250 * DefaultStyle.dp)
}
Button{
text: 'Call'

View file

@ -2,7 +2,7 @@ import QtQuick
Item {
id: root
property int size: 150
property real size: 150
property color borderColor
property color innerColor
width: size
@ -22,7 +22,7 @@ Item {
Canvas {
id: c
property bool animated: false
property int offset: 0
property real offset: 0
anchors.fill: parent
antialiasing: true
onOffsetChanged: requestPaint()
@ -58,4 +58,4 @@ Item {
}
}
}
}
}

View file

@ -23,15 +23,15 @@ FocusScope {
ColumnLayout {
anchors.fill: parent
spacing: 22 * DefaultStyle.dp
spacing: Math.round(22 * DefaultStyle.dp)
ColumnLayout {
spacing: 18 * DefaultStyle.dp
spacing: Math.round(18 * DefaultStyle.dp)
visible: mainItem.displayCurrentCalls
Text {
text: qsTr("Appels en cours")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h4.pixelSize
weight: Typography.h4.weight
}
}
Flickable {
@ -63,12 +63,12 @@ FocusScope {
}
onVisibleChanged: if (!visible) mainItem.numPadPopup.close()
contentItem: ColumnLayout {
spacing: 38 * DefaultStyle.dp
spacing: Math.round(38 * DefaultStyle.dp)
SearchBar {
id: searchBar
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Layout.rightMargin: 39 * DefaultStyle.dp
Layout.rightMargin: Math.round(39 * DefaultStyle.dp)
focus: true
color: mainItem.searchBarColor
borderColor: mainItem.searchBarBorderColor
@ -78,19 +78,19 @@ FocusScope {
}
ColumnLayout {
id: content
spacing: 32 * DefaultStyle.dp
spacing: Math.round(32 * DefaultStyle.dp)
Button {
id: grouCallButton
visible: mainItem.groupCallVisible && !SettingsCpp.disableMeetingsFeature
Layout.preferredWidth: 320 * DefaultStyle.dp
Layout.preferredHeight: 44 * DefaultStyle.dp
Layout.preferredWidth: Math.round(320 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(44 * DefaultStyle.dp)
padding: 0
KeyNavigation.up: searchBar
KeyNavigation.down: contactList
onClicked: mainItem.groupCallCreationRequested()
background: Rectangle {
anchors.fill: parent
radius: 50 * DefaultStyle.dp
radius: Math.round(50 * DefaultStyle.dp)
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: DefaultStyle.main2_100}
@ -98,20 +98,20 @@ FocusScope {
}
}
contentItem: RowLayout {
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
Image {
source: AppIcons.groupCall
Layout.preferredWidth: 44 * DefaultStyle.dp
sourceSize.width: 44 * DefaultStyle.dp
Layout.preferredWidth: Math.round(44 * DefaultStyle.dp)
sourceSize.width: Math.round(44 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
}
Text {
text: "Appel de groupe"
color: DefaultStyle.grey_1000
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h4.pixelSize
weight: Typography.h4.weight
}
}
Item {
@ -119,8 +119,8 @@ FocusScope {
}
EffectImage {
imageSource: AppIcons.rightArrow
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
colorizationColor: DefaultStyle.main2_500main
}
}

View file

@ -19,8 +19,8 @@ ColumnLayout{
Layout.fillWidth: true
verticalAlignment: (bottomTextItem.visible?Text.AlignBottom:Text.AlignVCenter)
visible: text != ""
font.weight: 400 * DefaultStyle.dp
font.pixelSize: 14 * DefaultStyle.dp
font.weight: Typography.p1.weight
font.pixelSize: Typography.p1.pixelSize
color: DefaultStyle.main2_700
text: mainItem.topText
width: mainItem.width
@ -33,8 +33,8 @@ ColumnLayout{
Layout.fillWidth: true
verticalAlignment: (topTextItem.visible?Text.AlignTop:Text.AlignVCenter)
visible: text != ''
font.weight: 300 * DefaultStyle.dp
font.pixelSize: 12 * DefaultStyle.dp
font.weight: Math.round(300 * DefaultStyle.dp)
font.pixelSize: Math.round(12 * DefaultStyle.dp)
color: DefaultStyle.main2_400
text: mainItem.bottomText
maximumLineCount: 1

View file

@ -24,7 +24,7 @@ MainRightPanel {
property string title: qsTr("Modifier contact")
property string saveButtonText: qsTr("Enregistrer")
property string oldPictureUri
property int addressCount: 0
property int addressCount: 0
signal closeEdition(var redirectAddress)
@ -34,31 +34,31 @@ MainRightPanel {
mainItem.contact.core.undo()
mainItem.closeEdition('')
}
width: 278 * DefaultStyle.dp
width: Math.round(278 * DefaultStyle.dp)
text: qsTr("Les changements seront annulés. Souhaitez-vous continuer ?")
}
headerContent: [
Text {
anchors.left: parent.left
anchors.leftMargin: 31 * DefaultStyle.dp
anchors.leftMargin: Math.round(31 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
text: mainItem.title
font {
pixelSize: 20 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Typography.h4.weight
}
},
Button {
style: ButtonStyle.noBackground
anchors.right: parent.right
anchors.rightMargin: 41 * DefaultStyle.dp
anchors.rightMargin: Math.round(41 * DefaultStyle.dp)
anchors.verticalCenter: parent.verticalCenter
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
width: Math.round(24 * DefaultStyle.dp)
height: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.closeX
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
onClicked: {
if (contact.core.isSaved) mainItem.closeEdition('')
else showConfirmationLambdaPopup("", qsTr("Les changements seront annulés. Souhaitez-vous continuer ?"), "", function(confirmed) {
@ -102,8 +102,8 @@ MainRightPanel {
visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0
icon.source: AppIcons.camera
text: qsTr("Ajouter une image")
textSize: 16 * DefaultStyle.dp
textWeight: 800 * DefaultStyle.dp
textSize: Typography.h4.pixelSize
textWeight: Typography.h4.weight
textColor: DefaultStyle.main2_700
hoveredTextColor: DefaultStyle.main2_800
pressedTextColor: DefaultStyle.main2_900
@ -113,7 +113,7 @@ MainRightPanel {
RowLayout {
visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0
Layout.alignment: Qt.AlignHCenter
spacing: 32 * DefaultStyle.dp
spacing: Math.round(32 * DefaultStyle.dp)
IconLabelButton {
id: editButton
Layout.preferredWidth: width
@ -122,8 +122,8 @@ MainRightPanel {
textColor: DefaultStyle.main2_700
hoveredTextColor: DefaultStyle.main2_800
pressedTextColor: DefaultStyle.main2_900
textSize: 16 * DefaultStyle.dp
textWeight: 800 * DefaultStyle.dp
textSize: Typography.h4.pixelSize
textWeight: Typography.h4.weight
KeyNavigation.right: removeButton
onClicked: fileDialog.open()
}
@ -146,8 +146,8 @@ MainRightPanel {
textColor: DefaultStyle.main2_700
hoveredTextColor: DefaultStyle.main2_800
pressedTextColor: DefaultStyle.main2_900
textSize: 16 * DefaultStyle.dp
textWeight: 800 * DefaultStyle.dp
textSize: Typography.h4.pixelSize
textWeight: Typography.h4.weight
KeyNavigation.left: editButton
onClicked: mainItem.contact.core.pictureUri = ""
}
@ -156,7 +156,7 @@ MainRightPanel {
]
content: Flickable {
id: editionLayout
contentWidth: 421 * DefaultStyle.dp
contentWidth: Math.round(421 * DefaultStyle.dp)
contentY: 0
signal ensureVisibleRequested(Item item)
@ -184,7 +184,7 @@ MainRightPanel {
ScrollBar.horizontal: Control.ScrollBar {
}
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
anchors.left: parent.left
anchors.right: parent.right
@ -195,7 +195,7 @@ MainRightPanel {
label: qsTr("Prénom")
contentItem: TextField {
id: givenNameEdit
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
initialText: contact.core.givenName
onTextEdited: {
contact.core.givenName = givenNameEdit.text
@ -260,7 +260,7 @@ MainRightPanel {
label: modelData.label
contentItem: RowLayout {
id: addressLayout
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
function updateFocus(event){
if(event.key == Qt.Key_Up){
if(index - 1 >=0 )
@ -278,7 +278,7 @@ MainRightPanel {
}
TextField {
id: addressTextField
Layout.preferredWidth: 421 * DefaultStyle.dp
Layout.preferredWidth: Math.round(421 * DefaultStyle.dp)
Layout.preferredHeight: height
onEditingFinished: {
if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text)
@ -292,12 +292,12 @@ MainRightPanel {
}
Button {
id: removeAddressButton
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.alignment: Qt.AlignVCenter
icon.source: AppIcons.closeX
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
style: ButtonStyle.noBackground
KeyNavigation.left: addressTextField
Keys.onPressed: (event) => addressLayout.updateFocus(event)
@ -347,7 +347,7 @@ MainRightPanel {
label: modelData.label
contentItem: RowLayout {
id: phoneNumberLayout
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
function updateFocus(event){
if(event.key == Qt.Key_Up){
if(index - 1 >=0 )
@ -365,7 +365,7 @@ MainRightPanel {
}
TextField {
id: phoneTextField
Layout.preferredWidth: 421 * DefaultStyle.dp
Layout.preferredWidth: Math.round(421 * DefaultStyle.dp)
Layout.preferredHeight: height
initialText: modelData.address
backgroundColor: DefaultStyle.grey_0
@ -378,13 +378,13 @@ MainRightPanel {
}
Button {
id: removePhoneButton
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.alignment: Qt.AlignVCenter
style: ButtonStyle.noBackground
icon.source: AppIcons.closeX
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
KeyNavigation.left: phoneTextField
Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event)
onClicked: mainItem.contact.core.removePhoneNumber(index)

View file

@ -19,7 +19,7 @@ LoginLayout {
BigButton {
enabled: mainItem.showBackButton
opacity: mainItem.showBackButton ? 1.0 : 0
Layout.leftMargin: 79 * DefaultStyle.dp
Layout.leftMargin: Math.round(79 * DefaultStyle.dp)
icon.source: AppIcons.leftArrow
style: ButtonStyle.noBackground
onClicked: {
@ -28,20 +28,20 @@ LoginLayout {
}
},
RowLayout {
spacing: 15 * DefaultStyle.dp
Layout.leftMargin: 21 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
Layout.leftMargin: Math.round(21 * DefaultStyle.dp)
EffectImage {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile
colorizationColor: DefaultStyle.main2_600
Layout.preferredHeight: 34 * DefaultStyle.dp
Layout.preferredWidth: 34 * DefaultStyle.dp
Layout.preferredHeight: Math.round(34 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(34 * DefaultStyle.dp)
}
Text {
text: qsTr("Connexion")
font {
pixelSize: 36 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h1.pixelSize
weight: Typography.h1.weight
}
}
},
@ -50,13 +50,13 @@ LoginLayout {
},
RowLayout {
visible: !SettingsCpp.assistantHideCreateAccount
spacing: 20 * DefaultStyle.dp
Layout.rightMargin: 51 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Layout.rightMargin: Math.round(51 * DefaultStyle.dp)
Text {
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
text: qsTr("Pas encore de compte ?")
font.pixelSize: 14 * DefaultStyle.dp
font.weight: 400 * DefaultStyle.dp
font.pixelSize: Typography.p1.pixelSize
font.weight: Typography.p1.weight
}
BigButton {
Layout.alignment: Qt.AlignRight
@ -73,8 +73,8 @@ LoginLayout {
Flickable {
anchors.left: parent.left
anchors.top: parent.top
anchors.leftMargin: 127 * DefaultStyle.dp
anchors.topMargin: 70 * DefaultStyle.dp
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
anchors.topMargin: Math.round(70 * DefaultStyle.dp)
anchors.bottom: parent.bottom
ColumnLayout {
id: content
@ -84,8 +84,8 @@ LoginLayout {
}
BigButton {
Layout.preferredWidth: loginForm.width
Layout.preferredHeight: 47 * DefaultStyle.dp
Layout.topMargin: 39 * DefaultStyle.dp
Layout.preferredHeight: Math.round(47 * DefaultStyle.dp)
Layout.topMargin: Math.round(39 * DefaultStyle.dp)
visible: !SettingsCpp.assistantHideThirdPartyAccount
text: qsTr("Compte SIP tiers")
style: ButtonStyle.secondary
@ -93,8 +93,8 @@ LoginLayout {
}
BigButton {
Layout.preferredWidth: loginForm.width
Layout.preferredHeight: 47 * DefaultStyle.dp
Layout.topMargin: 25 * DefaultStyle.dp
Layout.preferredHeight: Math.round(47 * DefaultStyle.dp)
Layout.topMargin: Math.round(25 * DefaultStyle.dp)
text: qsTr("Configuration distante")
style: ButtonStyle.secondary
onClicked: {fetchConfigDialog.open()}
@ -105,22 +105,22 @@ LoginLayout {
z: -1
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 129 * DefaultStyle.dp
anchors.rightMargin: 127 * DefaultStyle.dp
width: 395 * DefaultStyle.dp
height: 350 * DefaultStyle.dp
anchors.topMargin: Math.round(129 * DefaultStyle.dp)
anchors.rightMargin: Math.round(127 * DefaultStyle.dp)
width: Math.round(395 * DefaultStyle.dp)
height: Math.round(350 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
source: AppIcons.loginImage
}
]
Dialog{
id: fetchConfigDialog
height: 315 * DefaultStyle.dp
width: 637 * DefaultStyle.dp
leftPadding: 33 * DefaultStyle.dp
rightPadding: 33 * DefaultStyle.dp
topPadding: 41 * DefaultStyle.dp
bottomPadding: 29 * DefaultStyle.dp
height: Math.round(315 * DefaultStyle.dp)
width: Math.round(637 * DefaultStyle.dp)
leftPadding: Math.round(33 * DefaultStyle.dp)
rightPadding: Math.round(33 * DefaultStyle.dp)
topPadding: Math.round(41 * DefaultStyle.dp)
bottomPadding: Math.round(29 * DefaultStyle.dp)
radius: 0
title: qsTr('Télécharger une configuration distante')
text: qsTr('Veuillez entrer le lien de configuration qui vous a été fourni :')
@ -139,7 +139,7 @@ LoginLayout {
TextField{
id: configUrl
Layout.fillWidth: true
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
placeholderText: qsTr('Lien de configuration distante')
}
]

View file

@ -15,14 +15,14 @@ LoginLayout {
titleContent: [
RowLayout {
Layout.leftMargin: 119 * DefaultStyle.dp
Layout.leftMargin: Math.round(119 * DefaultStyle.dp)
visible: !SettingsCpp.assistantHideThirdPartyAccount
spacing: 21 * DefaultStyle.dp
spacing: Math.round(21 * DefaultStyle.dp)
Button {
id: backButton
visible: mainItem.showBackButton
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.leftArrow
style: ButtonStyle.noBackground
onClicked: {
@ -33,15 +33,15 @@ LoginLayout {
EffectImage {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile
Layout.preferredHeight: 34 * DefaultStyle.dp
Layout.preferredWidth: 34 * DefaultStyle.dp
Layout.preferredHeight: Math.round(34 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(34 * DefaultStyle.dp)
colorizationColor: DefaultStyle.main2_600
}
Text {
text: qsTr("Compte SIP tiers")
font {
pixelSize: 36 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h1.pixelSize
weight: Typography.h1.weight
}
scaleLettersFactor: 1.1
}
@ -51,14 +51,14 @@ LoginLayout {
},
RowLayout {
visible: !SettingsCpp.assistantHideCreateAccount
Layout.rightMargin: 51 * DefaultStyle.dp
spacing: 20 * DefaultStyle.dp
Layout.rightMargin: Math.round(51 * DefaultStyle.dp)
spacing: Math.round(20 * DefaultStyle.dp)
Text {
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
text: qsTr("Pas encore de compte ?")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
BigButton {
@ -83,19 +83,19 @@ LoginLayout {
flickableDirection: Flickable.VerticalFlick
ColumnLayout {
id: content
spacing: 85 * DefaultStyle.dp
spacing: Math.round(85 * DefaultStyle.dp)
ColumnLayout {
spacing: 0
ColumnLayout {
spacing: 28 * DefaultStyle.dp
spacing: Math.round(28 * DefaultStyle.dp)
Text {
Layout.fillWidth: true
Layout.preferredWidth: rootStackView.width
wrapMode: Text.WordWrap
color: DefaultStyle.main2_900
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400* DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
text: "Certaines fonctionnalités nécessitent un compte Linphone, comme la messagerie de groupe, les vidéoconférences..."
}
@ -105,8 +105,8 @@ LoginLayout {
wrapMode: Text.WordWrap
color: DefaultStyle.main2_900
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400* DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
text:"Ces fonctionnalités sont cachées lorsque vous vous enregistrez avec un compte SIP tiers."
}
@ -116,8 +116,8 @@ LoginLayout {
wrapMode: Text.WordWrap
color: DefaultStyle.main2_900
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400* DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
text: "Pour les activer dans un projet commercial, veuillez nous contacter. "
}
@ -125,7 +125,7 @@ LoginLayout {
SmallButton {
id: openLinkButton
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 18 * DefaultStyle.dp
Layout.topMargin: Math.round(18 * DefaultStyle.dp)
text: "linphone.org/contact"
style: ButtonStyle.secondary
onClicked: {
@ -136,7 +136,7 @@ LoginLayout {
}
}
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
BigButton {
id: createAccountButton
style: ButtonStyle.secondary
@ -176,11 +176,11 @@ LoginLayout {
flickableDirection: Flickable.VerticalFlick
ColumnLayout {
id: content
spacing: 2 * DefaultStyle.dp
width: 361 * DefaultStyle.dp
spacing: Math.round(2 * DefaultStyle.dp)
width: Math.round(361 * DefaultStyle.dp)
ColumnLayout {
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
FormItemLayout {
id: username
label: qsTr("Nom d'utilisateur")
@ -190,7 +190,7 @@ LoginLayout {
contentItem: TextField {
id: usernameEdit
isError: username.errorTextVisible || errorText.isVisible
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.down: passwordEdit
}
}
@ -204,7 +204,7 @@ LoginLayout {
id: passwordEdit
isError: password.errorTextVisible || errorText.isVisible
hidden: true
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: usernameEdit
KeyNavigation.down: domainEdit
}
@ -219,7 +219,7 @@ LoginLayout {
id: domainEdit
isError: domain.errorTextVisible
initialText: SettingsCpp.assistantThirdPartySipAccountDomain
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: passwordEdit
KeyNavigation.down: displayName
}
@ -235,7 +235,7 @@ LoginLayout {
Layout.fillWidth: true
contentItem: TextField {
id: displayName
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: domainEdit
KeyNavigation.down: transportCbox
}
@ -246,8 +246,8 @@ LoginLayout {
Layout.fillWidth: true
contentItem: ComboBox {
id: transportCbox
height: 49 * DefaultStyle.dp
width: 360 * DefaultStyle.dp
height: Math.round(49 * DefaultStyle.dp)
width: Math.round(360 * DefaultStyle.dp)
textRole: "text"
valueRole: "value"
model: [
@ -275,7 +275,7 @@ LoginLayout {
BigButton {
id: connectionButton
Layout.topMargin: 32 * DefaultStyle.dp
Layout.topMargin: Math.round(32 * DefaultStyle.dp)
style: ButtonStyle.main
contentItem: StackLayout {
id: connectionButtonContent
@ -286,8 +286,8 @@ LoginLayout {
verticalAlignment: Text.AlignVCenter
font {
pixelSize: 18 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Typography.b1.pixelSize
weight: Typography.b1.weight
}
color: DefaultStyle.grey_0
}
@ -358,18 +358,18 @@ LoginLayout {
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.topMargin: 70 * DefaultStyle.dp
anchors.leftMargin: 127 * DefaultStyle.dp
width: 361 * DefaultStyle.dp
anchors.topMargin: Math.round(70 * DefaultStyle.dp)
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
width: Math.round(361 * DefaultStyle.dp)
},
Image {
z: -1
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 129 * DefaultStyle.dp
anchors.rightMargin: 127 * DefaultStyle.dp
width: 395 * DefaultStyle.dp
height: 350 * DefaultStyle.dp
anchors.topMargin: Math.round(129 * DefaultStyle.dp)
anchors.rightMargin: Math.round(127 * DefaultStyle.dp)
width: Math.round(395 * DefaultStyle.dp)
height: Math.round(350 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
source: AppIcons.loginImage
}

View file

@ -24,7 +24,7 @@ FocusScope{
ColumnLayout {
anchors.fill: parent
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
ListView {
id: participantList
Layout.fillWidth: true
@ -40,14 +40,14 @@ FocusScope{
}
}
delegate: FocusScope {
height: 56 * DefaultStyle.dp
width: participantList.width - scrollbar.implicitWidth - 28 * DefaultStyle.dp
height: Math.round(56 * DefaultStyle.dp)
width: participantList.width - scrollbar.implicitWidth - Math.round(28 * DefaultStyle.dp)
RowLayout {
anchors.fill: parent
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
Avatar {
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
_address: modelData
shadowEnabled: false
}
@ -56,19 +56,19 @@ FocusScope{
maximumLineCount: 1
property var nameObj: UtilsCpp.getDisplayName(modelData)
text: nameObj ? nameObj.value : ""
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
font.capitalization: Font.Capitalize
}
Item {
Layout.fillWidth: true
}
Button {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
style: ButtonStyle.noBackgroundOrange
icon.source: AppIcons.closeX
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
focus: true
onClicked: contactList.removeSelectedContactByAddress(modelData)
}
@ -82,15 +82,15 @@ FocusScope{
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: 8 * DefaultStyle.dp
anchors.rightMargin: Math.round(8 * DefaultStyle.dp)
}
}
SearchBar {
id: searchBar
Layout.fillWidth: true
Layout.topMargin: 6 * DefaultStyle.dp
Layout.rightMargin: 28 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.topMargin: Math.round(6 * DefaultStyle.dp)
Layout.rightMargin: Math.round(28 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
placeholderText: mainItem.placeHolderText
focus: participantList.count == 0
color: mainItem.searchBarColor
@ -102,22 +102,22 @@ FocusScope{
}
ColumnLayout {
id: content
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
Text {
visible: !contactList.loading && contactList.count === 0
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 137 * DefaultStyle.dp
Layout.topMargin: Math.round(137 * DefaultStyle.dp)
text: qsTr("Aucun contact%1").arg(searchBar.text.length !== 0 ? " correspondant" : "")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h4.pixelSize
weight: Typography.h4.weight
}
}
AllContactListView{
id: contactList
Layout.fillWidth: true
Layout.fillHeight: true
itemsRightMargin: 28 * DefaultStyle.dp
itemsRightMargin: Math.round(28 * DefaultStyle.dp)
multiSelectionEnabled: true
showContactMenu: false
confInfoGui: mainItem.conferenceInfoGui

View file

@ -15,7 +15,7 @@ FocusScope {
ColumnLayout {
id: formLayout
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
anchors.fill: parent
Component.onCompleted: {
@ -26,14 +26,14 @@ FocusScope {
RowLayout {
visible: mainItem.isCreation && !SettingsCpp.disableBroadcastFeature
Layout.topMargin: 20 * DefaultStyle.dp
Layout.bottomMargin: 20 * DefaultStyle.dp
spacing: 18 * DefaultStyle.dp
Layout.topMargin: Math.round(20 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(20 * DefaultStyle.dp)
spacing: Math.round(18 * DefaultStyle.dp)
CheckableButton {
Layout.preferredWidth: 151 * DefaultStyle.dp
Layout.preferredWidth: Math.round(151 * DefaultStyle.dp)
icon.source: AppIcons.usersThree
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
enabled: false
text: qsTr("Réunion")
checked: true
@ -41,11 +41,11 @@ FocusScope {
style: ButtonStyle.secondary
}
CheckableButton {
Layout.preferredWidth: 151 * DefaultStyle.dp
Layout.preferredWidth: Math.round(151 * DefaultStyle.dp)
enabled: false
icon.source: AppIcons.slide
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
text: qsTr("Broadcast")
autoExclusive: true
style: ButtonStyle.secondary
@ -55,12 +55,12 @@ FocusScope {
visible: mainItem.isCreation
spacing: formLayout.spacing
content: RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.usersThree
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
TextInput {
id: confTitle
@ -69,8 +69,8 @@ FocusScope {
text: defaultText
color: DefaultStyle.main2_600
font {
pixelSize: 20 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Math.round(20 * DefaultStyle.dp)
weight: Typography.h3.weight
}
focus: true
onActiveFocusChanged: if(activeFocus) {
@ -90,16 +90,16 @@ FocusScope {
EffectImage {
imageSource: AppIcons.clock
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
CalendarComboBox {
id: startDate
background.visible: mainItem.isCreation
indicator.visible: mainItem.isCreation
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
contentText.font.weight: Math.min(Math.round((isCreation ? 700 : 400) * DefaultStyle.dp), 1000)
Layout.fillWidth: true
Layout.preferredHeight: 30 * DefaultStyle.dp
Layout.preferredHeight: Math.round(30 * DefaultStyle.dp)
KeyNavigation.up: confTitle
KeyNavigation.down: startHour
onSelectedDateChanged: {
@ -113,17 +113,17 @@ FocusScope {
},
RowLayout {
Item {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
RowLayout {
TimeComboBox {
id: startHour
// indicator.visible: mainItem.isCreation
Layout.preferredWidth: 94 * DefaultStyle.dp
Layout.preferredHeight: 30 * DefaultStyle.dp
Layout.preferredWidth: Math.round(94 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(30 * DefaultStyle.dp)
background.visible: mainItem.isCreation
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
contentText.font.weight: Math.min(Math.round((isCreation ? 700 : 400) * DefaultStyle.dp), 1000)
KeyNavigation.up: startDate
KeyNavigation.down: timeZoneCbox
KeyNavigation.left: endHour
@ -140,10 +140,10 @@ FocusScope {
TimeComboBox {
id: endHour
// indicator.visible: mainItem.isCreation
Layout.preferredWidth: 94 * DefaultStyle.dp
Layout.preferredHeight: 30 * DefaultStyle.dp
Layout.preferredWidth: Math.round(94 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(30 * DefaultStyle.dp)
background.visible: mainItem.isCreation
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
contentText.font.weight: Math.min(Math.round((isCreation ? 700 : 400) * DefaultStyle.dp), 1000)
onSelectedDateTimeChanged: mainItem.conferenceInfoGui.core.endDateTime = selectedDateTime
KeyNavigation.up: startDate
KeyNavigation.down: timeZoneCbox
@ -159,8 +159,8 @@ FocusScope {
property int min: (durationSec - hour*3600)/60
text: (hour > 0 ? hour + "h" : "") + (min > 0 ? min + "mn" : "")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
}
}
@ -169,12 +169,12 @@ FocusScope {
ComboBox {
id: timeZoneCbox
Layout.fillWidth: true
Layout.preferredHeight: 30 * DefaultStyle.dp
Layout.preferredHeight: Math.round(30 * DefaultStyle.dp)
hoverEnabled: true
oneLine: true
listView.implicitHeight: 250 * DefaultStyle.dp
listView.implicitHeight: Math.round(250 * DefaultStyle.dp)
constantImageSource: AppIcons.globe
weight: 700 * DefaultStyle.dp
weight: Typography.p2l.weight
leftMargin: 0
currentIndex: mainItem.conferenceInfoGui && model.count > 0 ? model.getIndex(mainItem.conferenceInfoGui.core.timeZoneModel) : -1
background: Rectangle {
@ -196,28 +196,28 @@ FocusScope {
Section {
spacing: formLayout.spacing
content: RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.note
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
TextArea {
id: descriptionEdit
Layout.fillWidth: true
Layout.preferredWidth: 275 * DefaultStyle.dp
leftPadding: 8 * DefaultStyle.dp
rightPadding: 8 * DefaultStyle.dp
Layout.preferredWidth: Math.round(275 * DefaultStyle.dp)
leftPadding: Math.round(8 * DefaultStyle.dp)
rightPadding: Math.round(8 * DefaultStyle.dp)
hoverEnabled: true
placeholderText: qsTr("Ajouter une description")
placeholderTextColor: DefaultStyle.main2_600
placeholderWeight: 700 * DefaultStyle.dp
placeholderWeight: Typography.p2l.weight
color: DefaultStyle.main2_600
Component.onCompleted: text = conferenceInfoGui.core.description
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
onEditingFinished: mainItem.conferenceInfoGui.core.description = text
Keys.onPressed: (event)=> {
@ -230,7 +230,7 @@ FocusScope {
background: Rectangle {
anchors.fill: parent
color: descriptionEdit.hovered || descriptionEdit.activeFocus ? DefaultStyle.grey_100 : "transparent"
radius: 4 * DefaultStyle.dp
radius: Math.round(4 * DefaultStyle.dp)
}
}
}
@ -241,26 +241,26 @@ FocusScope {
Button {
id: addParticipantsButton
Layout.fillWidth: true
Layout.preferredHeight: 30 * DefaultStyle.dp
Layout.preferredHeight: Math.round(30 * DefaultStyle.dp)
background: Rectangle {
anchors.fill: parent
color: addParticipantsButton.hovered || addParticipantsButton.activeFocus ? DefaultStyle.grey_100 : "transparent"
radius: 4 * DefaultStyle.dp
radius: Math.round(4 * DefaultStyle.dp)
}
contentItem: RowLayout {
spacing: 8 * DefaultStyle.dp
spacing: Math.round(8 * DefaultStyle.dp)
EffectImage {
imageSource: AppIcons.usersThree
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
}
Text {
Layout.fillWidth: true
text: qsTr("Ajouter des participants")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
}
}
@ -270,36 +270,36 @@ FocusScope {
id: participantList
Layout.fillWidth: true
Layout.preferredHeight: contentHeight
Layout.maximumHeight: 250 * DefaultStyle.dp
Layout.maximumHeight: Math.round(250 * DefaultStyle.dp)
clip: true
model: mainItem.conferenceInfoGui.core.participants
delegate: Item {
height: 56 * DefaultStyle.dp
height: Math.round(56 * DefaultStyle.dp)
width: participantList.width
RowLayout {
anchors.fill: parent
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
Avatar {
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.preferredWidth: Math.round(45 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(45 * DefaultStyle.dp)
_address: modelData.address
shadowEnabled: false
}
Text {
property var displayNameObj: UtilsCpp.getDisplayName(modelData.address)
text: displayNameObj?.value || ""
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
font.capitalization: Font.Capitalize
}
Item {
Layout.fillWidth: true
}
Button {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
Layout.rightMargin: 10 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
Layout.rightMargin: Math.round(10 * DefaultStyle.dp)
icon.source: AppIcons.closeX
style: ButtonStyle.noBackgroundOrange
onClicked: mainItem.conferenceInfoGui.core.removeParticipant(index)
@ -316,7 +316,7 @@ FocusScope {
}
Item {
Layout.fillHeight: true
Layout.minimumHeight: 1 * DefaultStyle.dp
Layout.minimumHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
}
}
}

View file

@ -17,11 +17,11 @@ LoginLayout {
onCtrlIsPressedChanged: console.log("ctrl is pressed", ctrlIsPressed)
titleContent: [
RowLayout {
spacing: 21 * DefaultStyle.dp
Layout.leftMargin: 119 * DefaultStyle.dp
spacing: Math.round(21 * DefaultStyle.dp)
Layout.leftMargin: Math.round(119 * DefaultStyle.dp)
Button {
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.leftArrow
style: ButtonStyle.noBackground
onClicked: {
@ -32,8 +32,8 @@ LoginLayout {
EffectImage {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile
Layout.preferredHeight: 34 * DefaultStyle.dp
Layout.preferredWidth: 34 * DefaultStyle.dp
Layout.preferredHeight: Math.round(34 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(34 * DefaultStyle.dp)
colorizationColor: DefaultStyle.main2_600
}
Text {
@ -43,8 +43,8 @@ LoginLayout {
text = qsTr("Inscription | Confirmer votre ") + completeString
}
font {
pixelSize: 36 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h1.pixelSize
weight: Typography.h1.weight
}
scaleLettersFactor: 1.1
}
@ -58,14 +58,14 @@ LoginLayout {
ColumnLayout {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 51 * DefaultStyle.dp
anchors.leftMargin: 127 * DefaultStyle.dp
spacing: 104 * DefaultStyle.dp
anchors.topMargin: Math.round(51 * DefaultStyle.dp)
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
spacing: Math.round(104 * DefaultStyle.dp)
Text {
font {
bold: true
pixelSize: 22 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h3.pixelSize
weight: Typography.h3.weight
}
color: DefaultStyle.main2_700
text: {
@ -74,7 +74,7 @@ LoginLayout {
}
}
RowLayout {
spacing: 45 * DefaultStyle.dp
spacing: Math.round(45 * DefaultStyle.dp)
Repeater {
model: 4
id: repeater
@ -139,12 +139,12 @@ LoginLayout {
}
}
RowLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Text {
text: "Didn't receive the code ?"
color: DefaultStyle.main2_700
font.pixelSize: 14 * DefaultStyle.dp
font.weight: 400 * DefaultStyle.dp
font.pixelSize: Typography.p1.pixelSize
font.weight: Typography.p1.weight
}
BigButton {
style: ButtonStyle.secondary
@ -158,10 +158,10 @@ LoginLayout {
Image {
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 140 * DefaultStyle.dp
anchors.rightMargin: 97 * DefaultStyle.dp
width: 477 * DefaultStyle.dp
height: 345 * DefaultStyle.dp
anchors.topMargin: Math.round(140 * DefaultStyle.dp)
anchors.rightMargin: Math.round(97 * DefaultStyle.dp)
width: Math.round(477 * DefaultStyle.dp)
height: Math.round(345 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
source: AppIcons.verif_page_image
}

View file

@ -32,8 +32,8 @@ LoginLayout {
titleContent: [
RowLayout {
spacing: 21 * DefaultStyle.dp
Layout.leftMargin: 79 * DefaultStyle.dp
spacing: Math.round(21 * DefaultStyle.dp)
Layout.leftMargin: Math.round(79 * DefaultStyle.dp)
BigButton {
style: ButtonStyle.noBackground
icon.source: AppIcons.leftArrow
@ -45,16 +45,16 @@ LoginLayout {
EffectImage {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile
Layout.preferredHeight: 34 * DefaultStyle.dp
Layout.preferredWidth: 34 * DefaultStyle.dp
Layout.preferredHeight: Math.round(34 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(34 * DefaultStyle.dp)
colorizationColor: DefaultStyle.main2_600
}
Text {
Layout.preferredWidth: width
text: qsTr("Inscription")
font {
pixelSize: 36 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h1.pixelSize
weight: Typography.h1.weight
}
wrapMode: Text.NoWrap
scaleLettersFactor: 1.1
@ -64,15 +64,15 @@ LoginLayout {
Layout.fillWidth: true
},
RowLayout {
spacing: 20 * DefaultStyle.dp
Layout.rightMargin: 51 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Layout.rightMargin: Math.round(51 * DefaultStyle.dp)
Text {
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
color: DefaultStyle.main2_700
text: qsTr("Déjà un compte ?")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
BigButton {
@ -89,10 +89,10 @@ LoginLayout {
centerContent: [
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 51 * DefaultStyle.dp
anchors.leftMargin: 127 * DefaultStyle.dp
anchors.rightMargin: 127 * DefaultStyle.dp
spacing: 50 * DefaultStyle.dp
anchors.topMargin: Math.round(51 * DefaultStyle.dp)
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
anchors.rightMargin: Math.round(127 * DefaultStyle.dp)
spacing: Math.round(50 * DefaultStyle.dp)
TabBar {
Layout.fillWidth: true
id: bar
@ -104,34 +104,34 @@ LoginLayout {
ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: 22 * DefaultStyle.dp
spacing: Math.round(22 * DefaultStyle.dp)
ColumnLayout {
spacing: 24 * DefaultStyle.dp
spacing: Math.round(24 * DefaultStyle.dp)
RowLayout {
Layout.preferredHeight: usernameItem.height
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
FormItemLayout {
id: usernameItem
label: qsTr("Username")
mandatory: true
enableErrorText: true
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
contentItem: TextField {
id: usernameInput
backgroundBorderColor: usernameItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
}
}
RowLayout {
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
ComboBox {
Layout.preferredWidth: 210 * DefaultStyle.dp
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredWidth: Math.round(210 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
enabled: false
model: [{text:"@sip.linphone.org"}]
}
EffectImage {
Layout.preferredWidth: 16 * DefaultStyle.dp
Layout.preferredHeight: 16 * DefaultStyle.dp
Layout.preferredWidth: Math.round(16 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(16 * DefaultStyle.dp)
imageSource: AppIcons.lock
colorizationColor: DefaultStyle.main2_600
}
@ -141,7 +141,7 @@ LoginLayout {
currentIndex: bar.currentIndex
PhoneNumberInput {
id: phoneNumberInput
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
property string completePhoneNumber: countryCode + phoneNumber
label: qsTr("Numéro de téléphone")
enableErrorText: true
@ -152,7 +152,7 @@ LoginLayout {
FormItemLayout {
id: emailItem
Layout.fillWidth: false
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
label: qsTr("Email")
mandatory: true
enableErrorText: true
@ -168,29 +168,29 @@ LoginLayout {
clip: false
RowLayout {
id: rowlayout
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
FormItemLayout {
id: passwordItem
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
label: qsTr("Mot de passe")
mandatory: true
enableErrorText: true
contentItem: TextField {
id: pwdInput
hidden: true
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
}
}
FormItemLayout {
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
label: qsTr("Confirmation mot de passe")
mandatory: true
enableErrorText: true
contentItem: TextField {
id: confirmPwdInput
hidden: true
Layout.preferredWidth: 346 * DefaultStyle.dp
Layout.preferredWidth: Math.round(346 * DefaultStyle.dp)
backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
}
}
@ -198,23 +198,23 @@ LoginLayout {
TemporaryText {
id: otherErrorText
Layout.fillWidth: true
Layout.topMargin: 5 * DefaultStyle.dp
Layout.topMargin: Math.round(5 * DefaultStyle.dp)
onTextChanged: console.log("set error", text)
}
}
}
// ColumnLayout {
// spacing: 18 * DefaultStyle.dp
// spacing: Math.round(18 * DefaultStyle.dp)
// RowLayout {
// spacing: 10 * DefaultStyle.dp
// spacing: Math.round(10 * DefaultStyle.dp)
// CheckBox {
// id: subscribeToNewsletterCheckBox
// }
// Text {
// text: qsTr("Je souhaite souscrire à la newletter Linphone.")
// font {
// pixelSize: 14 * DefaultStyle.dp
// weight: 400 * DefaultStyle.dp
// pixelSize: Typography.p1.pixelSize
// weight: Typography.p1.weight
// }
// MouseArea {
// anchors.fill: parent
@ -224,7 +224,7 @@ LoginLayout {
// }
RowLayout {
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
CheckBox {
id: termsCheckBox
}
@ -234,8 +234,8 @@ LoginLayout {
Text {
text: qsTr("J'accepte les ")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
MouseArea {
anchors.fill: parent
@ -246,8 +246,8 @@ LoginLayout {
activeFocusOnTab: true
font {
underline: true
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
bold: activeFocus
}
text: qsTr("conditions dutilisation")
@ -268,16 +268,16 @@ LoginLayout {
Text {
text: qsTr(" et la ")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
Text {
activeFocusOnTab: true
font {
underline: true
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
bold: activeFocus
}
text: qsTr("politique de confidentialité.")
@ -335,10 +335,10 @@ LoginLayout {
z: -1
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 129 * DefaultStyle.dp
anchors.rightMargin: 127 * DefaultStyle.dp
width: 395 * DefaultStyle.dp
height: 350 * DefaultStyle.dp
anchors.topMargin: Math.round(129 * DefaultStyle.dp)
anchors.rightMargin: Math.round(127 * DefaultStyle.dp)
width: Math.round(395 * DefaultStyle.dp)
height: Math.round(350 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
source: AppIcons.loginImage
}

View file

@ -13,35 +13,35 @@ LoginLayout {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile
colorizationColor: DefaultStyle.main2_600
Layout.preferredHeight: 34 * DefaultStyle.dp
Layout.preferredWidth: 34 * DefaultStyle.dp
Layout.preferredHeight: Math.round(34 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(34 * DefaultStyle.dp)
}
ColumnLayout {
Text {
text: qsTr("Choisir votre mode")
font {
pixelSize: 36 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
pixelSize: Typography.h1.pixelSize
weight: Typography.h1.weight
}
}
Text {
text: qsTr("Vous pourrez changer de mode plus tard.")
font.bold: true
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
}
}
centerContent: ColumnLayout {
spacing: 80 * DefaultStyle.dp
spacing: Math.round(80 * DefaultStyle.dp)
RowLayout {
id: radioButtonsLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
spacing: 70 * DefaultStyle.dp
spacing: Math.round(70 * DefaultStyle.dp)
Repeater {
model: [
{checked: true, title: qsTr("Chiffrement de bout en bout"), text: qsTr("Ce mode vous garanti la confidentialité de tous vos échanges. Notre technologie de chiffrement de bout en bout assure un niveau de sécurité maximal pour tous vos échanges."), imgUrl: AppIcons.chiffrement, color: DefaultStyle.info_500_main},
@ -63,7 +63,7 @@ LoginLayout {
id: continueButton
property int selectedIndex: 0
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
text: qsTr("Continuer")
style: ButtonStyle.main
onClicked: mainItem.modeSelected(selectedIndex)

View file

@ -27,17 +27,17 @@ AbstractMainPage {
id: leftPanel
Layout.fillWidth: true
Layout.fillHeight: true
property int sideMargin: 45 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
property real sideMargin: Math.round(45 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: leftPanel.sideMargin
Layout.rightMargin: leftPanel.sideMargin
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Button {
id: backButton
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.leftArrow
style: ButtonStyle.noBackground
focus: true
@ -60,7 +60,7 @@ AbstractMainPage {
Layout.fillWidth: true
Layout.fillHeight: true
model: mainItem.families
Layout.topMargin: 41 * DefaultStyle.dp
Layout.topMargin: Math.round(41 * DefaultStyle.dp)
Layout.leftMargin: leftPanel.sideMargin
property int selectedIndex: 0
activeFocusOnTab: true

View file

@ -18,15 +18,15 @@ Rectangle {
component AboutLine: RowLayout {
id: line
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
property var imageSource
property string title
property string text
property bool enableMouseArea: false
signal contentClicked()
EffectImage {
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
imageSource: parent.imageSource
colorizationColor: DefaultStyle.main1_500_main
}
@ -37,8 +37,8 @@ Rectangle {
text: line.title
color: DefaultStyle.main2_600
font {
pixelSize: 15 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
pixelSize: Typography.b2.pixelSize
weight: Typography.b2.weight
}
horizontalAlignment: Layout.AlignLeft
}
@ -47,7 +47,7 @@ Rectangle {
Layout.fillWidth: true
text: line.text
color: DefaultStyle.main2_500main
font.pixelSize: 14 * DefaultStyle.dp
font.pixelSize: Math.round(14 * DefaultStyle.dp)
horizontalAlignment: Layout.AlignLeft
Keys.onPressed: (event)=> {
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
@ -71,13 +71,13 @@ Rectangle {
Dialog {
id: aboutPopup
anchors.centerIn: parent
width: 637 * DefaultStyle.dp
width: Math.round(637 * DefaultStyle.dp)
title: qsTr("À propos de Linphone")
bottomPadding: 10 * DefaultStyle.dp
bottomPadding: Math.round(10 * DefaultStyle.dp)
buttons: []
content: RowLayout {
ColumnLayout {
spacing: 17 * DefaultStyle.dp
spacing: Math.round(17 * DefaultStyle.dp)
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
AboutLine {
imageSource: AppIcons.detective
@ -103,7 +103,7 @@ Rectangle {
}
Item {
// Item to shift close button
Layout.preferredHeight: 10 * DefaultStyle.dp
Layout.preferredHeight: Math.round(10 * DefaultStyle.dp)
}
}
MediumButton {
@ -121,8 +121,8 @@ Rectangle {
spacing: 0
RowLayout {
Layout.fillWidth: true
Layout.preferredHeight: 102 * DefaultStyle.dp
Layout.rightMargin: 42 * DefaultStyle.dp
Layout.preferredHeight: Math.round(102 * DefaultStyle.dp)
Layout.rightMargin: Math.round(42 * DefaultStyle.dp)
spacing: 0
Item {
Layout.fillWidth: true
@ -142,7 +142,7 @@ Rectangle {
RowLayout {
id: titleLayout
Layout.preferredHeight: 131 * DefaultStyle.dp
Layout.preferredHeight: Math.round(131 * DefaultStyle.dp)
Layout.fillWidth: true
spacing: 0
}
@ -156,7 +156,7 @@ Rectangle {
source: AppIcons.belledonne
fillMode: Image.Stretch
Layout.fillWidth: true
Layout.preferredHeight: 108 * DefaultStyle.dp
Layout.preferredHeight: Math.round(108 * DefaultStyle.dp)
}
}

View file

@ -114,12 +114,12 @@ Item {
RowLayout {
anchors.fill: parent
spacing: 0
anchors.topMargin: 25 * DefaultStyle.dp
anchors.topMargin: Math.round(25 * DefaultStyle.dp)
VerticalTabBar {
id: tabbar
Layout.fillHeight: true
Layout.preferredWidth: 82 * DefaultStyle.dp
Layout.preferredWidth: Math.round(82 * DefaultStyle.dp)
defaultAccount: accountProxy.defaultAccount
currentIndex: 0
Binding on currentIndex {
@ -181,10 +181,10 @@ Item {
RowLayout {
id: topRow
Layout.preferredHeight: 50 * DefaultStyle.dp
Layout.leftMargin: 45 * DefaultStyle.dp
Layout.rightMargin: 41 * DefaultStyle.dp
spacing: 25 * DefaultStyle.dp
Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
Layout.leftMargin: Math.round(45 * DefaultStyle.dp)
Layout.rightMargin: Math.round(41 * DefaultStyle.dp)
spacing: Math.round(25 * DefaultStyle.dp)
SearchBar {
id: magicSearchBar
Layout.fillWidth: true
@ -216,25 +216,24 @@ Item {
Popup {
id: listPopup
width: magicSearchBar.width
property int maxHeight: 400 * DefaultStyle.dp
property real maxHeight: Math.round(400 * DefaultStyle.dp)
property bool displayScrollbar: contactList.height > maxHeight
height: Math.min(
contactList.contentHeight,
maxHeight) + topPadding + bottomPadding
y: magicSearchBar.height
// closePolicy: Popup.CloseOnEscape
topPadding: 20 * DefaultStyle.dp
bottomPadding: contactList.haveContacts ? 20 * DefaultStyle.dp : 10
* DefaultStyle.dp
rightPadding: 8 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp
topPadding: Math.round(20 * DefaultStyle.dp)
bottomPadding: Math.round((contactList.haveContacts ? 20 : 10) * DefaultStyle.dp)
rightPadding: Math.round(8 * DefaultStyle.dp)
leftPadding: Math.round(20 * DefaultStyle.dp)
visible: magicSearchBar.text.length != 0
background: Item {
anchors.fill: parent
Rectangle {
id: popupBg
radius: 16 * DefaultStyle.dp
radius: Math.round(16 * DefaultStyle.dp)
color: DefaultStyle.grey_0
anchors.fill: parent
border.color: DefaultStyle.main1_500_main
@ -254,7 +253,7 @@ Item {
id: contactList
width: listPopup.width - listPopup.leftPadding
- listPopup.rightPadding
itemsRightMargin: 5 * DefaultStyle.dp //(Actions have already 10 of margin)
itemsRightMargin: Math.round(5 * DefaultStyle.dp) //(Actions have already 10 of margin)
showInitials: false
showContactMenu: false
showActions: true
@ -263,28 +262,28 @@ Item {
showDefaultAddress: true
searchOnEmpty: false
sectionsPixelSize: 13 * DefaultStyle.dp
sectionsWeight: 700 * DefaultStyle.dp
sectionsSpacing: 5 * DefaultStyle.dp
sectionsPixelSize: Typography.p2.pixelSize
sectionsWeight: Typography.p2.weight
sectionsSpacing: Math.round(5 * DefaultStyle.dp)
searchBarText: magicSearchBar.text
}
}
}
RowLayout {
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
PopupButton {
id: deactivateDndButton
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
popup.padding: 14 * DefaultStyle.dp
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
popup.padding: Math.round(14 * DefaultStyle.dp)
visible: SettingsCpp.dnd
contentItem: EffectImage {
imageSource: AppIcons.bellDnd
width: 32 * DefaultStyle.dp
height: 32 * DefaultStyle.dp
Layout.preferredWidth: 32 * DefaultStyle.dp
Layout.preferredHeight: 32 * DefaultStyle.dp
width: Math.round(32 * DefaultStyle.dp)
height: Math.round(32 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
colorizationColor: DefaultStyle.main1_500_main
}
@ -292,8 +291,8 @@ Item {
IconLabelButton {
Layout.fillWidth: true
focus: visible
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Désactiver ne pas déranger")
icon.source: AppIcons.bellDnd
onClicked: {
@ -305,8 +304,8 @@ Item {
}
Voicemail {
id: voicemail
Layout.preferredWidth: 42 * DefaultStyle.dp
Layout.preferredHeight: 36 * DefaultStyle.dp
Layout.preferredWidth: Math.round(42 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(36 * DefaultStyle.dp)
Repeater {
model: accountProxy
delegate: Item {
@ -359,9 +358,9 @@ Item {
}
PopupButton {
id: avatarButton
Layout.preferredWidth: 54 * DefaultStyle.dp
Layout.preferredWidth: Math.round(54 * DefaultStyle.dp)
Layout.preferredHeight: width
popup.padding: 14 * DefaultStyle.dp
popup.padding: Math.round(14 * DefaultStyle.dp)
contentItem: Avatar {
id: avatar
height: avatarButton.height
@ -381,10 +380,10 @@ Item {
}
PopupButton {
id: settingsMenuButton
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
popup.width: 271 * DefaultStyle.dp
popup.padding: 14 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
popup.width: Math.round(271 * DefaultStyle.dp)
popup.padding: Math.round(14 * DefaultStyle.dp)
popup.contentItem: FocusScope {
id: popupFocus
implicitHeight: settingsButtons.implicitHeight
@ -399,15 +398,15 @@ Item {
ColumnLayout {
id: settingsButtons
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
anchors.fill: parent
IconLabelButton {
id: accountButton
Layout.fillWidth: true
visible: !SettingsCpp.hideAccountSettings
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Mon compte")
icon.source: AppIcons.manageProfile
onClicked: openAccountSettings(
@ -422,8 +421,8 @@ Item {
IconLabelButton {
id: dndButton
Layout.fillWidth: true
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: SettingsCpp.dnd ? qsTr("Désactiver ne pas déranger") : qsTr(
"Activer ne pas déranger")
icon.source: AppIcons.bellDnd
@ -442,8 +441,8 @@ Item {
id: settingsButton
Layout.fillWidth: true
visible: !SettingsCpp.hideSettings
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Paramètres")
icon.source: AppIcons.settings
onClicked: openContextualMenuComponent(
@ -459,8 +458,8 @@ Item {
id: recordsButton
Layout.fillWidth: true
visible: !SettingsCpp.disableCallRecordings
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Enregistrements")
icon.source: AppIcons.micro
KeyNavigation.up: visibleChildren.length
@ -473,8 +472,8 @@ Item {
IconLabelButton {
id: helpButton
Layout.fillWidth: true
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Aide")
icon.source: AppIcons.question
onClicked: openContextualMenuComponent(
@ -489,8 +488,8 @@ Item {
IconLabelButton {
id: quitButton
Layout.fillWidth: true
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Quitter Linphone")
icon.source: AppIcons.power
onClicked: {
@ -516,7 +515,7 @@ Item {
}
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1 * DefaultStyle.dp
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
visible: addAccountButton.visible
color: DefaultStyle.main2_400
}
@ -525,8 +524,8 @@ Item {
Layout.fillWidth: true
visible: SettingsCpp.maxAccount == 0
|| SettingsCpp.maxAccount > accountProxy.count
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
text: qsTr("Ajouter un compte")
icon.source: AppIcons.plusCircle
onClicked: mainItem.addAccountRequest()
@ -643,7 +642,7 @@ Item {
pushExit: noTransition
popEnter: noTransition
popExit: noTransition
Layout.topMargin: 24 * DefaultStyle.dp
Layout.topMargin: Math.round(24 * DefaultStyle.dp)
Layout.fillWidth: true
Layout.fillHeight: true
initialItem: mainStackLayoutComponent

View file

@ -16,14 +16,14 @@ Rectangle {
property var model
color: DefaultStyle.grey_0
property var container
// property int contentHeight: contentListView.contentHeight
property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp
// property real contentHeight: contentListView.contentHeight
property real minimumWidthForSwitchintToRowLayout: Math.round(981 * DefaultStyle.dp)
property var useVerticalLayout
property bool saveButtonVisible: true
signal save()
signal undo()
function setResponsivityFlags() {
var newValue = width < minimumWidthForSwitchintToRowLayout * DefaultStyle.dp
var newValue = width < minimumWidthForSwitchintToRowLayout
if (useVerticalLayout != newValue) {
useVerticalLayout = newValue
}
@ -38,8 +38,8 @@ Rectangle {
id: header
anchors.left: parent.left
anchors.right: parent.right
leftPadding: 45 * DefaultStyle.dp
rightPadding: 45 * DefaultStyle.dp
leftPadding: Math.round(45 * DefaultStyle.dp)
rightPadding: Math.round(45 * DefaultStyle.dp)
z: 1
background: Rectangle {
anchors.fill: parent
@ -48,17 +48,17 @@ Rectangle {
contentItem: ColumnLayout {
RowLayout {
Layout.fillWidth: true
Layout.topMargin: 20 * DefaultStyle.dp
spacing: 5 * DefaultStyle.dp
Layout.bottomMargin: 10 * DefaultStyle.dp
Layout.topMargin: Math.round(20 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(10 * DefaultStyle.dp)
Button {
id: backButton
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
icon.source: AppIcons.leftArrow
focus: true
visible: mainItem.container.depth > 1
Layout.rightMargin: 41 * DefaultStyle.dp
Layout.rightMargin: Math.round(41 * DefaultStyle.dp)
style: ButtonStyle.noBackground
onClicked: {
mainItem.container.pop()
@ -75,13 +75,13 @@ Rectangle {
Loader {
Layout.alignment: Qt.AlignRight
sourceComponent: mainItem.topbarOptionalComponent
Layout.rightMargin: 34 * DefaultStyle.dp
Layout.rightMargin: Math.round(34 * DefaultStyle.dp)
}
MediumButton {
id: saveButton
style: ButtonStyle.main
text: qsTr("Enregistrer")
Layout.rightMargin: 6 * DefaultStyle.dp
Layout.rightMargin: Math.round(6 * DefaultStyle.dp)
visible: mainItem.saveButtonVisible
onClicked: {
mainItem.save()
@ -90,7 +90,7 @@ Rectangle {
}
Rectangle {
Layout.fillWidth: true
height: 1 * DefaultStyle.dp
height: Math.max(Math.round(1 * DefaultStyle.dp), 1)
color: DefaultStyle.main2_500main
}
}
@ -101,7 +101,7 @@ Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: header.bottom
anchors.topMargin: 16 * DefaultStyle.dp
anchors.topMargin: Math.round(16 * DefaultStyle.dp)
// Workaround while the CI is made with Qt6.5.3
// When updated to 6.8, remove this Item and
// change the ScrollView with a Flickable
@ -115,7 +115,7 @@ Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: 15 * DefaultStyle.dp
anchors.rightMargin: Math.round(15 * DefaultStyle.dp)
}
Control.ScrollBar.horizontal: ScrollBar {
active: false
@ -125,19 +125,19 @@ Rectangle {
model: mainItem.contentModel
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 45 * DefaultStyle.dp
anchors.rightMargin: 45 * DefaultStyle.dp
anchors.leftMargin: Math.round(45 * DefaultStyle.dp)
anchors.rightMargin: Math.round(45 * DefaultStyle.dp)
height: contentHeight
spacing: 10 * DefaultStyle.dp
spacing: Math.round(10 * DefaultStyle.dp)
delegate: ColumnLayout {
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
width: contentListView.width
Rectangle {
visible: index !== 0
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
Layout.bottomMargin: 16 * DefaultStyle.dp
Layout.topMargin: Math.round((modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp)
Layout.bottomMargin: Math.round(16 * DefaultStyle.dp)
Layout.fillWidth: true
height: 1 * DefaultStyle.dp
height: Math.max(Math.round(1 * DefaultStyle.dp), 1)
color: modelData.hideTopSeparator ? 'transparent' : DefaultStyle.main2_500main
}
GridLayout {
@ -145,12 +145,12 @@ Rectangle {
columns: mainItem.useVerticalLayout ? 1 : 2
Layout.fillWidth: true
// Layout.preferredWidth: parent.width
rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp
columnSpacing: 47 * DefaultStyle.dp
rowSpacing: Math.round((modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp)
columnSpacing: Math.round(47 * DefaultStyle.dp)
ColumnLayout {
Layout.preferredWidth: 341 * DefaultStyle.dp
Layout.maximumWidth: 341 * DefaultStyle.dp
spacing: 3 * DefaultStyle.dp
Layout.preferredWidth: Math.round(341 * DefaultStyle.dp)
Layout.maximumWidth: Math.round(341 * DefaultStyle.dp)
spacing: Math.round(3 * DefaultStyle.dp)
Text {
text: modelData.title
visible: modelData.title.length > 0
@ -172,10 +172,10 @@ Rectangle {
}
}
RowLayout {
Layout.topMargin: (modelData.hideTopMargin ? 0 : (mainItem.useVerticalLayout ? 10 : 21)) * DefaultStyle.dp
Layout.bottomMargin: 21 * DefaultStyle.dp
Layout.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
Layout.topMargin: Math.round((modelData.hideTopMargin ? 0 : (mainItem.useVerticalLayout ? 10 : 21)) * DefaultStyle.dp)
Layout.bottomMargin: Math.round(21 * DefaultStyle.dp)
Layout.leftMargin: mainItem.useVerticalLayout ? 0 : Math.round(17 * DefaultStyle.dp)
Layout.preferredWidth: Math.round((modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp)
Layout.alignment: Qt.AlignRight
Loader {
id: contentLoader
@ -183,7 +183,7 @@ Rectangle {
sourceComponent: modelData.contentComponent
}
Item {
Layout.preferredWidth: (modelData.customRightMargin > 0 ? modelData.customRightMargin : 17) * DefaultStyle.dp
Layout.preferredWidth: Math.round((modelData.customRightMargin > 0 ? modelData.customRightMargin : 17) * DefaultStyle.dp)
}
}
}

View file

@ -35,21 +35,21 @@ AbstractSettingsLayout {
id: accountParametersComponent
ColumnLayout {
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Avatar {
id: avatar
account: model
displayPresence: false
Layout.preferredWidth: 100 * DefaultStyle.dp
Layout.preferredHeight: 100 * DefaultStyle.dp
Layout.preferredWidth: Math.round(100 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(100 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
}
IconLabelButton {
visible: model.core.pictureUri.length === 0
Layout.preferredWidth: width
icon.source: AppIcons.camera
icon.width: 17 * DefaultStyle.dp
icon.height: 17 * DefaultStyle.dp
icon.width: Math.round(17 * DefaultStyle.dp)
icon.height: Math.round(17 * DefaultStyle.dp)
text: qsTr("Ajouter une image")
style: ButtonStyle.noBackground
onClicked: fileDialog.open()
@ -58,12 +58,12 @@ AbstractSettingsLayout {
RowLayout {
visible: model.core.pictureUri.length > 0
Layout.alignment: Qt.AlignHCenter
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
IconLabelButton {
Layout.preferredWidth: width
icon.source: AppIcons.pencil
icon.width: 17 * DefaultStyle.dp
icon.height: 17 * DefaultStyle.dp
icon.width: Math.round(17 * DefaultStyle.dp)
icon.height: Math.round(17 * DefaultStyle.dp)
text: qsTr("Modifier l'image")
style: ButtonStyle.noBackground
onClicked: fileDialog.open()
@ -71,8 +71,8 @@ AbstractSettingsLayout {
IconLabelButton {
Layout.preferredWidth: width
icon.source: AppIcons.trashCan
icon.width: 17 * DefaultStyle.dp
icon.height: 17 * DefaultStyle.dp
icon.width: Math.round(17 * DefaultStyle.dp)
icon.height: Math.round(17 * DefaultStyle.dp)
text: qsTr("Supprimer l'image")
style: ButtonStyle.noBackground
onClicked: model.core.pictureUri = ""
@ -91,7 +91,7 @@ AbstractSettingsLayout {
}
RowLayout {
Layout.fillWidth: true
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Text {
Layout.alignment: Qt.AlignLeft
text: qsTr("Adresse SIP :")
@ -115,7 +115,7 @@ AbstractSettingsLayout {
}
}
ColumnLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Layout.alignment: Qt.AlignLeft
Text {
text: qsTr("Nom daffichage")
@ -131,7 +131,7 @@ AbstractSettingsLayout {
TextField {
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.preferredHeight: 49 * DefaultStyle.dp
Layout.preferredHeight: Math.round(49 * DefaultStyle.dp)
initialText: model.core.displayName
backgroundColor: DefaultStyle.grey_100
onEditingFinished: {
@ -146,7 +146,7 @@ AbstractSettingsLayout {
}
ComboSetting {
Layout.fillWidth: true
Layout.topMargin: -15 * DefaultStyle.dp
Layout.topMargin: -Math.round(15 * DefaultStyle.dp)
entries: account.core.dialPlans
propertyName: "dialPlan"
propertyOwnerGui: account
@ -161,9 +161,9 @@ AbstractSettingsLayout {
}
RowLayout {
id:mainItem
spacing : 20 * DefaultStyle.dp
spacing : Math.round(20 * DefaultStyle.dp)
ColumnLayout {
spacing : 5 * DefaultStyle.dp
spacing : Math.round(5 * DefaultStyle.dp)
Text {
text: qsTr("Supprimer mon compte")
font: Typography.p2l
@ -185,7 +185,7 @@ AbstractSettingsLayout {
BigButton {
style: ButtonStyle.noBackgroundRed
Layout.alignment: Qt.AlignRight
Layout.rightMargin: 5 * DefaultStyle.dp
Layout.rightMargin: Math.round(5 * DefaultStyle.dp)
icon.source: AppIcons.trashCan
onClicked: {
var mainWin = UtilsCpp.getMainWindow()
@ -213,25 +213,25 @@ AbstractSettingsLayout {
RoundedPane {
Layout.fillWidth: true
Layout.fillHeight: true
// Layout.minimumHeight: account.core.devices.length * 133 * DefaultStyle.dp + (account.core.devices.length - 1) * 15 * DefaultStyle.dp + 2 * 21 * DefaultStyle.dp
Layout.rightMargin: 30 * DefaultStyle.dp
Layout.topMargin: 20 * DefaultStyle.dp
Layout.bottomMargin: 4 * DefaultStyle.dp
Layout.leftMargin: 44 * DefaultStyle.dp
topPadding: 21 * DefaultStyle.dp
bottomPadding: 21 * DefaultStyle.dp
leftPadding: 17 * DefaultStyle.dp
rightPadding: 17 * DefaultStyle.dp
// Layout.minimumHeight: account.core.devices.length * Math.round(133 * DefaultStyle.dp) + (account.core.devices.length - 1) * Math.round(15 * DefaultStyle.dp) + 2 * Math.round(21 * DefaultStyle.dp)
Layout.rightMargin: Math.round(30 * DefaultStyle.dp)
Layout.topMargin: Math.round(20 * DefaultStyle.dp)
Layout.bottomMargin: Math.round(4 * DefaultStyle.dp)
Layout.leftMargin: Math.round(44 * DefaultStyle.dp)
topPadding: Math.round(21 * DefaultStyle.dp)
bottomPadding: Math.round(21 * DefaultStyle.dp)
leftPadding: Math.round(17 * DefaultStyle.dp)
rightPadding: Math.round(17 * DefaultStyle.dp)
background: Rectangle {
anchors.fill: parent
color: DefaultStyle.grey_100
radius: 15 * DefaultStyle.dp
radius: Math.round(15 * DefaultStyle.dp)
}
contentItem: ColumnLayout {
spacing: 15 * DefaultStyle.dp
spacing: Math.round(15 * DefaultStyle.dp)
BusyIndicator {
Layout.preferredWidth: 60 * DefaultStyle.dp
Layout.preferredHeight: 60 * DefaultStyle.dp
Layout.preferredWidth: Math.round(60 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(60 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter
visible: devices.loading
}
@ -252,24 +252,24 @@ AbstractSettingsLayout {
}
Control.Control {
Layout.fillWidth: true
height: 133 * DefaultStyle.dp
topPadding: 26 * DefaultStyle.dp
bottomPadding: 26 * DefaultStyle.dp
rightPadding: 36 * DefaultStyle.dp
leftPadding: 33 * DefaultStyle.dp
height: Math.round(133 * DefaultStyle.dp)
topPadding: Math.round(26 * DefaultStyle.dp)
bottomPadding: Math.round(26 * DefaultStyle.dp)
rightPadding: Math.round(36 * DefaultStyle.dp)
leftPadding: Math.round(33 * DefaultStyle.dp)
background: Rectangle {
anchors.fill: parent
color: DefaultStyle.grey_0
radius: 10 * DefaultStyle.dp
radius: Math.round(10 * DefaultStyle.dp)
}
contentItem: ColumnLayout {
width: parent.width
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
RowLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
EffectImage {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.preferredWidth: Math.round(24 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
fillMode: Image.PreserveAspectFit
colorizationColor: DefaultStyle.main2_600
imageSource: modelData.core.userAgent.toLowerCase().includes('ios') | modelData.core.userAgent.toLowerCase().includes('android') ? AppIcons.mobile : AppIcons.desktop
@ -286,8 +286,8 @@ AbstractSettingsLayout {
Layout.alignment: Qt.AlignRight
text: qsTr("Supprimer")
icon.source: AppIcons.trashCan
icon.width: 16 * DefaultStyle.dp
icon.height: 16 * DefaultStyle.dp
icon.width: Math.round(16 * DefaultStyle.dp)
icon.height: Math.round(16 * DefaultStyle.dp)
style: ButtonStyle.tertiary
onClicked: {
var mainWin = UtilsCpp.getMainWindow()
@ -303,15 +303,15 @@ AbstractSettingsLayout {
}
}
RowLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Text {
text: qsTr("Dernière connexion:")
color: DefaultStyle.main2_600
font: Typography.p2
}
EffectImage {
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
imageSource: AppIcons.calendar
colorizationColor: DefaultStyle.main2_600
fillMode: Image.PreserveAspectFit
@ -322,8 +322,8 @@ AbstractSettingsLayout {
font: Typography.p1
}
EffectImage {
Layout.preferredWidth: 20 * DefaultStyle.dp
Layout.preferredHeight: 20 * DefaultStyle.dp
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
imageSource: AppIcons.clock
colorizationColor: DefaultStyle.main2_600
fillMode: Image.PreserveAspectFit

View file

@ -44,7 +44,7 @@ AbstractSettingsLayout {
ColumnLayout {
id: column
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
DecoratedTextField {
propertyName: "mwiServerAddress"
propertyOwnerGui: account
@ -71,7 +71,7 @@ AbstractSettingsLayout {
id: advancedParametersComponent
ColumnLayout {
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Text {
text: qsTr("Transport")
color: DefaultStyle.main2_600
@ -79,7 +79,7 @@ AbstractSettingsLayout {
}
ComboSetting {
Layout.fillWidth: true
Layout.topMargin: -15 * DefaultStyle.dp
Layout.topMargin: Math.round(-15 * DefaultStyle.dp)
entries: account.core.transports
propertyName: "transport"
propertyOwnerGui: account

View file

@ -55,7 +55,7 @@ AbstractSettingsLayout {
Component {
id: systemComponent
ColumnLayout {
spacing: 40 * DefaultStyle.dp
spacing: Math.round(40 * DefaultStyle.dp)
SwitchSetting {
Layout.fillWidth: true
titleText: qsTr("Démarrer automatiquement Linphone")
@ -71,7 +71,7 @@ AbstractSettingsLayout {
Component {
id: remoteProvisioningComponent
ColumnLayout {
spacing: 6 * DefaultStyle.dp
spacing: Math.round(6 * DefaultStyle.dp)
DecoratedTextField {
Layout.fillWidth: true
id: configUri
@ -79,7 +79,7 @@ AbstractSettingsLayout {
toValidate: true
}
SmallButton {
Layout.topMargin: -20 * DefaultStyle.dp
Layout.topMargin: -Math.round(20 * DefaultStyle.dp)
Layout.alignment: Qt.AlignRight
text: qsTr("Télécharger et appliquer")
style: ButtonStyle.tertiary
@ -97,14 +97,14 @@ AbstractSettingsLayout {
Component {
id: securityComponent
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
ColumnLayout {
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Text {
text: qsTr("Chiffrement du média")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
}
ComboSetting {
@ -134,13 +134,13 @@ AbstractSettingsLayout {
ListView {
Layout.preferredHeight: contentHeight
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
model: PayloadTypeProxy {
filterType: PayloadTypeProxy.Audio | PayloadTypeProxy.NotDownloadable
}
delegate: SwitchSetting {
width: parent.width
height: 32 * DefaultStyle.dp
height: Math.round(32 * DefaultStyle.dp)
titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType)
subTitleText: modelData.core.clockRate + " Hz"
propertyName: "enabled"
@ -156,18 +156,18 @@ AbstractSettingsLayout {
Component {
id: videoCodecsComponent
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
ListView {
Layout.preferredHeight: contentHeight
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
model: PayloadTypeProxy {
id: videoPayloadTypeProxy
filterType: PayloadTypeProxy.Video | PayloadTypeProxy.NotDownloadable
}
delegate: SwitchSetting {
width: parent.width
height: 32 * DefaultStyle.dp
height: Math.round(32 * DefaultStyle.dp)
titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType)
subTitleText: modelData.core.encoderDescription
propertyName: "enabled"
@ -177,14 +177,14 @@ AbstractSettingsLayout {
ListView {
Layout.preferredHeight: contentHeight
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
model: PayloadTypeProxy {
id: downloadableVideoPayloadTypeProxy
filterType: PayloadTypeProxy.Video | PayloadTypeProxy.Downloadable
}
delegate: SwitchSetting {
width: parent.width
height: 32 * DefaultStyle.dp
height: Math.round(32 * DefaultStyle.dp)
titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType)
subTitleText: modelData.core.encoderDescription
onCheckedChanged: Utils.openCodecOnlineInstallerDialog(
@ -211,7 +211,7 @@ AbstractSettingsLayout {
Component {
id: hideFpsComponent
ColumnLayout {
spacing: 40 * DefaultStyle.dp
spacing: Math.round(40 * DefaultStyle.dp)
SwitchSetting {
titleText:qsTr("Cacher les FPS")
propertyName: "hideFps"

View file

@ -35,7 +35,7 @@ AbstractSettingsLayout {
Component {
id: genericParametersComponent
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
SwitchSetting {
titleText: qsTr("Annulateur d'écho")
subTitleText: qsTr("Évite que de l'écho soit entendu par votre correspondant")
@ -73,7 +73,7 @@ AbstractSettingsLayout {
MultimediaSettings {
ringerDevicesVisible: true
backgroundVisible: false
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
}
}
}

View file

@ -40,12 +40,12 @@ AbstractSettingsLayout {
Component {
id: topBar
RowLayout {
spacing: 20 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
BigButton {
style: ButtonStyle.noBackground
icon.source: AppIcons.trashCan
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp)
visible: !isNew
onClicked: {
var mainWin = UtilsCpp.getMainWindow()
@ -68,10 +68,10 @@ AbstractSettingsLayout {
id: cardDavParametersComponent
ColumnLayout {
Layout.fillWidth: true
spacing: 20 * DefaultStyle.dp
Layout.rightMargin: 44 * DefaultStyle.dp
Layout.topMargin: 20 * DefaultStyle.dp
Layout.leftMargin: 64 * DefaultStyle.dp
spacing: Math.round(20 * DefaultStyle.dp)
Layout.rightMargin: Math.round(44 * DefaultStyle.dp)
Layout.topMargin: Math.round(20 * DefaultStyle.dp)
Layout.leftMargin: Math.round(64 * DefaultStyle.dp)
DecoratedTextField {
propertyName: "displayName"
propertyOwnerGui: carddavGui

View file

@ -25,18 +25,18 @@ RowLayout {
signal save()
signal undo()
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 16 * DefaultStyle.dp
spacing: Math.round(16 * DefaultStyle.dp)
Repeater {
model: mainItem.proxyModel
RowLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft|Qt.AlignHCenter
Layout.preferredHeight: 74 * DefaultStyle.dp
spacing: 20 * DefaultStyle.dp
Layout.preferredHeight: Math.round(74 * DefaultStyle.dp)
spacing: Math.round(20 * DefaultStyle.dp)
Text {
text: modelData.core[titleProperty]
font: Typography.p2l
@ -51,8 +51,8 @@ RowLayout {
Button {
style: ButtonStyle.noBackground
icon.source: AppIcons.pencil
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
icon.width: Math.round(24 * DefaultStyle.dp)
icon.height: Math.round(24 * DefaultStyle.dp)
onClicked: {
mainItem.owner.container.push(mainItem.settingsLayout, {
titleText: mainItem.editText,
@ -104,7 +104,7 @@ RowLayout {
}
RowLayout {
Layout.fillWidth: true
spacing: 5 * DefaultStyle.dp
spacing: Math.round(5 * DefaultStyle.dp)
Item {
Layout.fillWidth: true
}

Some files were not shown because too many files have changed in this diff Show more