Skip to content
Snippets Groups Projects
Unverified Commit 5cf6565d authored by Sébastien Blin's avatar Sébastien Blin
Browse files

SelectScreen: label should always be at the same place

Change-Id: Ic3ac47d20e21c31a37fe0c69e5ad5ac9ba2f2575
GitLab: #611
parent 398b384f
No related branches found
No related tags found
No related merge requests found
......@@ -140,10 +140,24 @@ Window {
border.color: selectedScreenNumber === index ? JamiTheme.screenSelectionBorderColor : JamiTheme.tabbarBorderColor
visible: JamiStrings.selectScreen !== screens[index] && index < Qt.application.screens.length
Text {
id: screenName
anchors.top: screenItem.top
anchors.topMargin: 10
anchors.horizontalCenter: screenItem.horizontalCenter
width: parent.width
font.pointSize: JamiTheme.textFontSize
text: screens[index] ? screens[index] : ""
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
color: JamiTheme.textColor
}
PreviewRenderer {
id: screenPreview
anchors.top: screenItem.top
anchors.top: screenName.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenItem.horizontalCenter
height: screenItem.height - 50
......@@ -164,20 +178,6 @@ Window {
}
}
Text {
id: screenName
anchors.top: screenPreview.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenItem.horizontalCenter
width: parent.width
font.pointSize: JamiTheme.textFontSize
text: screens[index] ? screens[index] : ""
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
color: JamiTheme.textColor
}
MouseArea {
anchors.fill: screenItem
acceptedButtons: Qt.LeftButton
......@@ -215,10 +215,22 @@ Window {
visible: Qt.application.screens.length > 1
Text {
id: screenNameAll
anchors.top: screenSelectionRectAll.top
anchors.topMargin: 10
anchors.horizontalCenter: screenSelectionRectAll.horizontalCenter
font.pointSize: JamiTheme.textFontSize
text: JamiStrings.allScreens
color: JamiTheme.textColor
}
PreviewRenderer {
id: screenShotAll
anchors.top: screenSelectionRectAll.top
anchors.top: screenNameAll.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenSelectionRectAll.horizontalCenter
height: screenSelectionRectAll.height - 50
......@@ -239,18 +251,6 @@ Window {
}
}
Text {
id: screenNameAll
anchors.top: screenShotAll.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenSelectionRectAll.horizontalCenter
font.pointSize: JamiTheme.textFontSize
text: JamiStrings.allScreens
color: JamiTheme.textColor
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
......@@ -291,10 +291,24 @@ Window {
border.color: selectedScreenNumber === index ? JamiTheme.screenSelectionBorderColor : JamiTheme.tabbarBorderColor
visible: JamiStrings.selectScreen !== screens[index] && index >= Qt.application.screens.length
Text {
id: screenName2
anchors.top: screenItem2.top
anchors.topMargin: 10
anchors.horizontalCenter: screenItem2.horizontalCenter
width: parent.width
font.pointSize: JamiTheme.textFontSize
text: screens[index] ? screens[index] : ""
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
color: JamiTheme.textColor
}
PreviewRenderer {
id: screenPreview2
anchors.top: screenItem2.top
anchors.top: screenName2.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenItem2.horizontalCenter
anchors.leftMargin: 25
......@@ -317,20 +331,6 @@ Window {
}
}
Text {
id: screenName2
anchors.top: screenPreview2.bottom
anchors.topMargin: 10
anchors.horizontalCenter: screenItem2.horizontalCenter
width: parent.width
font.pointSize: JamiTheme.textFontSize
text: screens[index] ? screens[index] : ""
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
color: JamiTheme.textColor
}
MouseArea {
anchors.fill: screenItem2
acceptedButtons: Qt.LeftButton
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment