Skip to content
Permalink
Browse files

Update Button.qml

  • Loading branch information
martonborzak committed Jan 3, 2020
1 parent 1f86bc7 commit 7c2b242c6b780851fa92c7c726e8559067817f9c
Showing with 8 additions and 3 deletions.
  1. +8 −3 components/climate/ui/Button.qml
@@ -21,8 +21,8 @@
*****************************************************************************/

import QtQuick 2.11
//import QtQuick.Controls 2.5
//import QtGraphicalEffects 1.0
import Entity.Climate 1.0

import Style 1.0

import "qrc:/scripts/helper.js" as JSHelper
@@ -41,7 +41,12 @@ Comp.ButtonBase {
id: info
color: Style.colorText
opacity: 0.5
text: qsTr("Temperature: ") + obj.temperature + obj.temperatureUnit + translateHandler.emptyString
text: {
if (obj.isSupported(Climate.F_TEMPERATURE))
return qsTr("Temperature: ") + obj.temperature + obj.temperatureUnit + translateHandler.emptyString
else if (obj.isSupported(Climate.F_TARGET_TEMPERATURE))
return qsTr("Temperature: ") + obj.targetTemperature + obj.temperatureUnit + translateHandler.emptyString
}
elide: Text.ElideRight
wrapMode: Text.WordWrap
width: title.width

0 comments on commit 7c2b242

Please sign in to comment.
You can’t perform that action at this time.