mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 10:45:54 +08: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
@ -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…
x
Reference in New Issue
Block a user