summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNedim Hadzic <nedim.hadzic@pelagicore.com>2017-03-22 18:53:40 +0100
committerAlistair Adams <alistair.adams@qt.io>2017-03-22 18:23:30 +0000
commita857a031614806125250d017f4dfa41c4331c083 (patch)
tree81d1b413718985e58ab8cac591a91f3c9b1b70a4
parent49591f0833a5bd7983b1f68a17df2f033f9e9817 (diff)
downloadneptune-ui-a857a031614806125250d017f4dfa41c4331c083.tar.gz
Fix overlapping text in Radio application
Exposed fontSize as a separate alias so other Label components in the system are not affected. This should be a temp solution since we will bring QCC2 and should solve issues like this on system level. Change-Id: I037a1f7bb42e4f444f2007b97efe2f061bb36994 Tas-number: AUTOSUITE-48 Reviewed-by: Alistair Adams <alistair.adams@qt.io>
-rw-r--r--apps/com.pelagicore.radio/StationInfo.qml4
-rw-r--r--apps/com.pelagicore.radio/TunerSlider.qml36
-rw-r--r--imports/shared/controls/Label.qml2
3 files changed, 22 insertions, 20 deletions
diff --git a/apps/com.pelagicore.radio/StationInfo.qml b/apps/com.pelagicore.radio/StationInfo.qml
index 40de438..6292294 100644
--- a/apps/com.pelagicore.radio/StationInfo.qml
+++ b/apps/com.pelagicore.radio/StationInfo.qml
@@ -67,7 +67,7 @@ UIElement {
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignBottom
- font.pixelSize: Style.fontSizeXXL
+ fontSize: Style.fontSizeXXL
}
Label {
id: suffix
@@ -76,7 +76,7 @@ UIElement {
text: "MHz"
- font.pixelSize: Style.fontSizeXXS
+ fontSize: Style.fontSizeXXS
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
diff --git a/apps/com.pelagicore.radio/TunerSlider.qml b/apps/com.pelagicore.radio/TunerSlider.qml
index 9bca9ed..4ba1bfd 100644
--- a/apps/com.pelagicore.radio/TunerSlider.qml
+++ b/apps/com.pelagicore.radio/TunerSlider.qml
@@ -88,14 +88,14 @@ UIElement {
id: minFreqLabel
text: minimum
- width: 0
+ width: textObject.contentWidth
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.left
anchors.bottom: parent.bottom
font.family: Style.fontFamily
- font.pixelSize: Style.fontSizeS
+ fontSize: Style.fontSizeS
font.weight: Style.fontWeight
color: Style.colorWhite
@@ -104,21 +104,21 @@ UIElement {
Label {
text: "MHz"
- anchors.left: minFreqLabel.left
+ anchors.left: minFreqLabel.right
- width: Style.hspan(0.9)
+ width: Style.hspan(0.8)
- horizontalAlignment: Text.AlignRight
+ horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
- font.pixelSize: Style.fontSizeXXS
+ fontSize: Style.fontSizeXXS
}
Label {
id: meanFreqLabel
text: (minimum + maximum) / 2
- width: 0
+ width: textObject.contentWidth
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
@@ -127,7 +127,7 @@ UIElement {
font.family: Style.fontFamily
- font.pixelSize: Style.fontSizeM
+ fontSize: Style.fontSizeM
font.weight: Style.fontWeight
color: Style.colorWhite
@@ -136,28 +136,28 @@ UIElement {
Label {
text: "MHz"
- width: Style.hspan(1.1)
+ width: Style.hspan(1)
- anchors.left: meanFreqLabel.left
+ anchors.left: meanFreqLabel.right
- horizontalAlignment: Text.AlignRight
+ horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
- font.pixelSize: Style.fontSizeXXS
+ fontSize: Style.fontSizeXXS
}
Label {
id: maxFreqLabel
text: maximum
- width: 0
+ width: textObject.contentWidth
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.right
anchors.bottom: parent.bottom
font.family: Style.fontFamily
- font.pixelSize: Style.fontSizeS
+ fontSize: Style.fontSizeS
font.weight: Style.fontWeight
color: Style.colorWhite
@@ -166,14 +166,14 @@ UIElement {
Label {
text: "MHz"
- width: Style.hspan(0.9)
+ width: Style.hspan(0.8)
- anchors.left: maxFreqLabel.left
+ anchors.left: maxFreqLabel.right
- horizontalAlignment: Text.AlignRight
+ horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
- font.pixelSize: Style.fontSizeXXS
+ fontSize: Style.fontSizeXXS
}
}
diff --git a/imports/shared/controls/Label.qml b/imports/shared/controls/Label.qml
index 6647683..7715b56 100644
--- a/imports/shared/controls/Label.qml
+++ b/imports/shared/controls/Label.qml
@@ -35,8 +35,10 @@ import utils 1.0
UIElement {
id: root
+ property alias textObject: textElement
property alias text: textElement.text
property alias font: textElement.font
+ property alias fontSize: textElement.font.pixelSize
property alias color: textElement.color
property alias textFormat: textElement.textFormat
property alias horizontalAlignment: textElement.horizontalAlignment