diff options
-rw-r--r-- | qml/js/utils.js | 2 | ||||
-rw-r--r-- | qml/pages/OneDayZoomItem.qml | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/qml/js/utils.js b/qml/js/utils.js index 1326b89..69ab20c 100644 --- a/qml/js/utils.js +++ b/qml/js/utils.js @@ -126,7 +126,7 @@ function getMaxTempLenght(cityModel) { var stringTemp = "555" // temperatures estimated between -55 and +55 if (maxLength === 3) stringTemp = "-" + stringTemp - return stringTemp.substring(0, maxLength) + "°C." + return stringTemp.substring(0, maxLength) } // WeatherModel utils diff --git a/qml/pages/OneDayZoomItem.qml b/qml/pages/OneDayZoomItem.qml index f1dff3b..3b5d853 100644 --- a/qml/pages/OneDayZoomItem.qml +++ b/qml/pages/OneDayZoomItem.qml @@ -119,7 +119,8 @@ GridLayout { Layout.alignment: Qt.AlignCenter } TouchLabel { - Layout.preferredWidth: expectedTextWidth(Utils.getMaxTempLenght(ApplicationInfo.currentCityModel)) + Layout.preferredWidth: expectedTextWidth(Utils.getTempFormat(Utils.getMaxTempLenght(ApplicationInfo.currentCityModel))) + + 4 * ApplicationInfo.ratio property int temp: Utils.getTemperature(root.slider.value, root.model) text : Utils.getTempFormat(temp) color: temp < 0 ? ApplicationInfo.colors.blue : ApplicationInfo.colors.doubleDarkGray |