Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.77 KB | None | 0 0
  1.         Row {
  2.             anchors {
  3.                 top: titleText.bottom
  4.                 //horizontalCenter: parent.horizontalCenter
  5.                 //horizontalCenterOffset: ( valuesText.contentWidth - valuesText.width ) / 2.0
  6.                 left: titleText.left
  7.                 bottom: parent.bottom
  8.                 topMargin: App.style.suzukiDatabox.valueHeightMargin
  9.                 bottomMargin: App.style.suzukiDatabox.valueHeightMargin
  10.             }
  11.  
  12.             //width: valuesText.width + unitText.width + valuesText.calculatedRightMargin
  13.  
  14.             Text {
  15.                 id: valuesText
  16.  
  17.                 width: implicitWidth
  18.                 height: parent.height
  19.  
  20.                 text: _isValueCombined
  21.                     ? model.value1 + "\n" + model.value2
  22.                     : model.value1
  23.  
  24.                 maximumLineCount: _isValueCombined ? 2 : 1
  25.                 color: paletteSwitcher.colorSet.textColor
  26.                 font.pixelSize: App.style.suzukiDatabox.valueFontSize
  27.                 font.family: App.style.suzukiDatabox.fontFamily
  28.                 fontSizeMode: Text.Fit
  29.                 verticalAlignment: Text.AlignVCenter
  30.                 horizontalAlignment: Text.AlignLeft
  31.             }
  32.  
  33.             Text {
  34.                 id: unitText
  35.  
  36.                 height: implicitHeight
  37.                 anchors.left: valuesText.right
  38.                 anchors.leftMargin: 5
  39.                 anchors.baseline: valuesText.baseline
  40.  
  41.                 width: implicitWidth
  42.  
  43.                 visible: !_isValueCombined
  44.                 text: model.unit
  45.                 color: paletteSwitcher.colorSet.textColor
  46.                 font.pixelSize: App.style.suzukiDatabox.unitFontSize
  47.                 font.family: App.style.suzukiDatabox.fontFamily
  48.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement