Skip to content

Commit

Permalink
Add duration to ThreadPanel tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
olehkuznetsov committed Dec 19, 2024
1 parent dbaba29 commit 6f587a5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ protected Hover onTrackMouseMove(
for (int i = 0; i < data.schedStarts.length; i++) {
if (data.schedStarts[i] <= t && t <= data.schedEnds[i]) {
int index = i;
hoveredTitle = data.schedStates[i].label;
hoveredTitle = data.schedStates[i].label
+ " (" + TimeSpan.timeToString(data.schedEnds[i] - data.schedStarts[i]) + ")";
hoveredCategory = "";
hoveredSize = m.measure(Fonts.Style.Normal, hoveredTitle);

Expand Down Expand Up @@ -344,6 +345,7 @@ public boolean click() {
hoveredTitle = hoveredCategory;
hoveredCategory = "";
}
hoveredTitle += " (" + TimeSpan.timeToString(slices.ends[i] - slices.starts[i]) + ")";

hoveredSize = Size.vertCombine(HOVER_PADDING, HOVER_PADDING / 2,
m.measure(Fonts.Style.Normal, hoveredTitle),
Expand Down

0 comments on commit 6f587a5

Please sign in to comment.