mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
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.
This commit is contained in:
parent
1e79f28842
commit
b776afaf3d
1 changed files with 4 additions and 15 deletions
|
@ -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 += "<tr><td>" + feature_name + ":" +
|
||||
" </td><td>" + print_time[feature].getDisplayString(UM.DurationFormat.Short) +
|
||||
" </td><td>" + Math.round(100 * parseInt(print_time[feature].getDisplayString(UM.DurationFormat.Seconds)) / total_seconds) + "%" +
|
||||
content += "<tr><td colspan='2'>" + feature + "</td></tr>" +
|
||||
"<tr>" +
|
||||
"<td width='60%'>" + print_time[feature].getDisplayString(UM.DurationFormat.Short) + "</td>" +
|
||||
"<td width='40%'> " + Math.round(100 * parseInt(print_time[feature].getDisplayString(UM.DurationFormat.Seconds)) / total_seconds) + "%" +
|
||||
"</td></tr>";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue