From b776afaf3ddfb00c5b4a6521e20d2a4d34bfa755 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 22 Nov 2017 20:09:39 +0100 Subject: [PATCH] CURA-4509 Changing layout of the print time information tooltip, now in two lines per feature. This is for avoid trimming the labels because they depend on the language. --- resources/qml/Sidebar.qml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 383c599da8..31bda45b56 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -343,7 +343,6 @@ Rectangle onEntered: { - if(base.printDuration.valid && !base.printDuration.isTotalDurationZero) { // All the time information for the different features is achieved @@ -356,20 +355,10 @@ Rectangle { if(!print_time[feature].isTotalDurationZero) { - var feature_name = ""; - - if (feature.length <= 11) - { - feature_name = feature - } - else{ - feature_name = feature.substring(0, 8) + "..." - } - - - content += "" + feature_name + ":" + - "  " + print_time[feature].getDisplayString(UM.DurationFormat.Short) + - "  " + Math.round(100 * parseInt(print_time[feature].getDisplayString(UM.DurationFormat.Seconds)) / total_seconds) + "%" + + content += "" + feature + "" + + "" + + "" + print_time[feature].getDisplayString(UM.DurationFormat.Short) + "" + + "  " + Math.round(100 * parseInt(print_time[feature].getDisplayString(UM.DurationFormat.Seconds)) / total_seconds) + "%" + ""; } }