Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.22 KB | None | 0 0
  1.  
  2.             Text {
  3.                 id: valuesText
  4.  
  5.                 width: implicitWidth
  6.                 height: parent.height
  7.  
  8.                 text: _isValueCombined
  9.                     ? model.value1 + "\n" + model.value2
  10.                     : model.value1
  11.  
  12.                 maximumLineCount: _isValueCombined ? 2 : 1
  13.                 color: paletteSwitcher.colorSet.textColor
  14.                 font.pixelSize: App.style.suzukiDatabox.valueFontSize
  15.                 font.family: App.style.suzukiDatabox.fontFamily
  16.                 fontSizeMode: Text.Fit
  17.                 verticalAlignment: Text.AlignVCenter
  18.                 horizontalAlignment: Text.AlignLeft
  19.             }
  20.  
  21.             Text {
  22.                 id: unitText
  23.  
  24.                 height: implicitHeight
  25.                 anchors.left: valuesText.right
  26.                 anchors.leftMargin: 5
  27.                 anchors.baseline: valuesText.baseline
  28.  
  29.                 width: implicitWidth
  30.  
  31.                 visible: !_isValueCombined
  32.                 text: model.unit
  33.                 color: paletteSwitcher.colorSet.textColor
  34.                 font.pixelSize: App.style.suzukiDatabox.unitFontSize
  35.                 font.family: App.style.suzukiDatabox.fontFamily
  36.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement