-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show ToolTip on Network Traffic graph #492
Conversation
e1561e0
to
45d8f34
Compare
Concept ACK I think this PR is an improvement from a UX perspective. I shall be testing this PR when the TODO is completed. |
b617de1
to
ec67f11
Compare
@shaavan TODOs now updated |
094c5bf
to
b12b28a
Compare
12b583a
to
d672263
Compare
Had to keep changing the strUnit function as the printf test kept failing (it makes false assumptions). |
03e8413
to
30fca02
Compare
I'd fancy reviewing this,
but my time is very limited.
As you keep finishing PRs, I could use some meta issue
(or something) helping me realize the dependency tree
between PRs without me having to spend time figuring it out.
Cheers,
…On Tue, Dec 7, 2021 at 10:42 AM Rebroad ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/util/strencodings.cpp
<#492 (comment)>:
> + } else if (value < 1'000'000'000) {
+ letter = "M";
+ value /= 1'000'000;
+ } else {
+ letter = "G";
+ value /= 1'000'000'000;
+ }
+ if (value < 1) return strprintf(strprintf("%%.%df %s%%s", dp, letter), value, strUnit);
+ if (value < 10) return strprintf(strprintf("%%.%df %s%%s", std::max(dp - 1, 0), letter), value, strUnit);
+ if (value < 100) return strprintf(strprintf("%%.%df %s%%s", std::max(dp - 2, 0), letter), value, strUnit);
+ if (value < 1'000) return strprintf(strprintf("%%.%df %s%%s", std::max(dp - 3, 0), letter), value, strUnit);
+
+ return strprintf(strprintf("%%.%df %s%%s", std::max(dp - 4, 0), letter), value, strUnit);
+}
+
+std::string strBps(float bits) {
This isn't used by this PR, but is planned to be used in #305
<#305>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#492 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMRS4WYRUK34NOVAYWUPPBDUPXJHPANCNFSM5JEVGYYQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
30fca02
to
d563044
Compare
Hi. The latest push to this PR ought to be the last one - I had been trying to get the ToolTips to behave better, which they now do. They no longer time-out (disappear) and they also can now moved along with the graph regardless of the duration/speed selected. Also, the yellow circle will disappear more reliably now if the ToolTip also disappears (due to the mouse pointing elsewhere). It took a while to refine this functionality, which in the latest commit required an additional timer (tt_timer) to check the ToolTip status at an interval independent of the graph being updated, or the mouse moving. |
6679d1f
to
968fb4b
Compare
968fb4b
to
6c139eb
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Built and tested this, seems cool. |
painter.setPen(Qt::yellow); | ||
int w = width() - XMARGIN * 2; | ||
int x = XMARGIN + w - w * ttpoint / DESIRED_SAMPLES; | ||
int y = y_value(floatmax(vSamplesIn.at(ttpoint), vSamplesOut.at(ttpoint))); | ||
painter.drawEllipse(QPointF(x, y), 3, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about fencing these in a function? Maybe a macro?
Maybe add a couple of comments?
@@ -262,8 +262,7 @@ void TrafficGraphWidget::setGraphRangeMins(int mins) | |||
int msecsPerSample = nMins * 60 * 1000 / DESIRED_SAMPLES; | |||
timer->stop(); | |||
timer->setInterval(msecsPerSample); | |||
|
|||
clear(); | |||
timer->start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you separate this change in a rev of its own?
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Closing due to a long period of inactivity here. Feel free to reopen. |
#473 is similarly inactive.
…On Thu, May 26, 2022 at 7:22 PM Hennadii Stepanov ***@***.***> wrote:
Closing due to a long period of inactivity here. Feel free to reopen.
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMRS4W7L4JVJ3LULH5S767TVL6XMDANCNFSM5JEVGYYQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Enables a tooltip on the graph to make it easier to see what point in time a part of the graph corresponds to.
This PR includes the change in #484, but also deals with the potential issues that the simplicity of 484 introduced.
TODO: