mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
misc: resolve qml warnings present on application start
- Resolves a portion of the warnings present prior to navigation or resizing. Gitlab: #5 Change-Id: Ifa843d7613ddcca562256399a977c2eec62df404
This commit is contained in:
parent
3550806981
commit
a79bf21a27
8 changed files with 50 additions and 30 deletions
|
@ -20,11 +20,13 @@ import QtQuick 2.14
|
|||
import QtQuick.Controls 1.4
|
||||
import net.jami.Models 1.0
|
||||
|
||||
|
||||
Label {
|
||||
id: root
|
||||
|
||||
property string eText : ""
|
||||
property int maxWidth: 100
|
||||
property int fontSize: JamiTheme.textFontSize
|
||||
property int textWidth: 0
|
||||
|
||||
font.pointSize: fontSize
|
||||
font.kerning: true
|
||||
|
@ -37,8 +39,14 @@ Label {
|
|||
|
||||
TextMetrics {
|
||||
id: elided
|
||||
|
||||
font: root.font
|
||||
elide: Text.ElideRight
|
||||
elideWidth: maxWidth
|
||||
text: eText
|
||||
|
||||
onTextChanged: {
|
||||
textWidth = elided.boundingRect.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -301,6 +301,7 @@ Window {
|
|||
|
||||
Rectangle {
|
||||
id: mainViewSidePanelRect
|
||||
|
||||
SplitView.minimumWidth: sidePanelViewStackPreferredWidth
|
||||
SplitView.maximumWidth: (sidePanelHidden ? splitView.width :
|
||||
splitView.width - sidePanelViewStackPreferredWidth)
|
||||
|
@ -404,6 +405,7 @@ Window {
|
|||
|
||||
LeftPanelView {
|
||||
id: leftPanelSettingsView
|
||||
|
||||
visible: false
|
||||
contentViewportWidth: mainViewSidePanelRect.width
|
||||
contentViewPortHeight: mainViewSidePanelRect.height
|
||||
|
@ -600,10 +602,9 @@ Window {
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
sidePanelViewStack.SplitView.maximumWidth = Qt.binding(function() {
|
||||
return (sidePanelHidden ? splitView.width :
|
||||
splitView.width - sidePanelViewStackPreferredWidth)
|
||||
mainViewSidePanelRect.SplitView.maximumWidth = Qt.binding(function() {
|
||||
return sidePanelHidden ? splitView.width :
|
||||
splitView.width - sidePanelViewStackPreferredWidth
|
||||
})
|
||||
|
||||
recordBox.x = Qt.binding(function() {
|
||||
|
|
|
@ -195,7 +195,11 @@ Rectangle {
|
|||
TextMetrics {
|
||||
id: textMetricsjamiBestNameText
|
||||
font: jamiBestNameText.font
|
||||
text: videoCallPageRect.bestName
|
||||
text: {
|
||||
if (videoCallPageRect)
|
||||
return videoCallPageRect.bestName
|
||||
return ""
|
||||
}
|
||||
elideWidth: overlayUpperPartRect.width / 3
|
||||
elide: Qt.ElideRight
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ Rectangle {
|
|||
DistantRenderer {
|
||||
id: distantRenderer
|
||||
|
||||
anchors.centerIn: videoCallPageMainRect
|
||||
anchors.centerIn: parent
|
||||
z: -1
|
||||
|
||||
width: videoCallPageMainRect.width
|
||||
|
|
|
@ -42,7 +42,11 @@ Dialog {
|
|||
smooth: false
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "image://qrImage/account_" + AccountAdapter.currentAccountId
|
||||
source: {
|
||||
if (AccountAdapter.currentAccountId)
|
||||
return "image://qrImage/account_" + AccountAdapter.currentAccountId
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
|
@ -180,7 +180,7 @@ Rectangle {
|
|||
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumWidth: JamiTheme.maximumWidthSettingsView
|
||||
anchors.centerIn: parent
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
isSIP: settingsViewRect.isSIP
|
||||
|
||||
|
@ -199,7 +199,7 @@ Rectangle {
|
|||
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumWidth: JamiTheme.maximumWidthSettingsView
|
||||
anchors.centerIn: parent
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
// av setting page, index 2
|
||||
|
@ -208,7 +208,7 @@ Rectangle {
|
|||
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumWidth: JamiTheme.maximumWidthSettingsView
|
||||
anchors.centerIn: parent
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
// plugin setting page, index 3
|
||||
|
@ -216,7 +216,7 @@ Rectangle {
|
|||
id: pluginSettings
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumWidth: JamiTheme.maximumWidthSettingsView
|
||||
anchors.centerIn: parent
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,28 +76,27 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
ElidedTextLabel {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: textWidth
|
||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||
|
||||
eText: JamiStrings.sdpSettingsTitle
|
||||
fontSize: JamiTheme.headerFontSize
|
||||
maxWidth: width
|
||||
}
|
||||
|
||||
ElidedTextLabel {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
eText: JamiStrings.sdpSettingsSubtitle
|
||||
fontSize: JamiTheme.settingsFontSize
|
||||
maxWidth: width
|
||||
maxWidth: root.width
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
ElidedTextLabel {
|
||||
Layout.preferredWidth: textWidth
|
||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||
|
||||
eText: JamiStrings.sdpSettingsSubtitle
|
||||
fontSize: JamiTheme.settingsFontSize
|
||||
maxWidth: parent.width - JamiTheme.preferredMarginSize
|
||||
}
|
||||
|
||||
SettingSpinBox {
|
||||
id: audioRTPMinPortSpinBox
|
||||
|
||||
|
|
|
@ -558,8 +558,11 @@ Dialog {
|
|||
currentIndex: 0
|
||||
TabButton {
|
||||
id: pageOne
|
||||
|
||||
width: tabBar.width / 2
|
||||
text: qsTr("1")
|
||||
height: 30
|
||||
|
||||
text: "1"
|
||||
down: true
|
||||
// customize tab button
|
||||
contentItem: Text {
|
||||
|
@ -573,8 +576,7 @@ Dialog {
|
|||
// customize tab button
|
||||
background: Rectangle {
|
||||
id: buttonRectOne
|
||||
implicitWidth: tabBar.width / 2
|
||||
implicitHeight: tabBar.height
|
||||
|
||||
radius: 10
|
||||
color: pageOne.down ? "#e0e0e0" :"#fdfdfd"
|
||||
MouseArea {
|
||||
|
@ -589,8 +591,11 @@ Dialog {
|
|||
}
|
||||
TabButton {
|
||||
id: pageTwo
|
||||
text: qsTr("2")
|
||||
|
||||
width: tabBar.width / 2
|
||||
height: 30
|
||||
|
||||
text: "2"
|
||||
contentItem: Text {
|
||||
text: pageTwo.text
|
||||
font: pageTwo.font
|
||||
|
@ -602,8 +607,7 @@ Dialog {
|
|||
|
||||
background: Rectangle {
|
||||
id: buttonRectTwo
|
||||
implicitWidth: tabBar.width / 2
|
||||
implicitHeight: tabBar.height
|
||||
|
||||
radius: 10
|
||||
color: pageTwo.down ? "#e0e0e0" :"#fdfdfd"
|
||||
MouseArea {
|
||||
|
|
Loading…
Add table
Reference in a new issue