-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Improve tooltips for torrent progress bar #4936
Conversation
No! Don't do that. |
@LordNyriox , thank you! I always forget to replace those Q_DECL_OVERRIDE inserted by Qt Creator... |
@evsh It's a little unexpected for me that the progress bar doesn't really show the progress of downloading torrent, but the downloaded parts of it and the real progress bar is just the small one shown int the Done column. |
@Danny3 to me this "progress line" looks like a separate widget. Why does the progress percentage not satisfy you? Do you want just a graphical representation or there is something more in this progress bar? |
I found the "progress line" to be useful in 2 cases: I thought that qBittorrent tried to offer a simmilar UI to μTorrent keeping as much as possible of the good features in μTorrent. |
@Danny3, thank you for the explanations! Thinking about this progress bar, may I ask just one more question? Why don't you use the ETA column in the torrent list? Is it because the column relies on instantaneous speed? What do you think about a small addition to this progress line: to show completed in blue and active (donwloading) in green if the width of this addition is big enough (> 1px?)? |
@Chocobo1,thank you for the comments! I will definitely investigate the first problem, because the strange thing is I changed the bar drawing code to avoid the same "hovered" impression on my system. Perhaps this is just because of the difference between light and dark backgrounds. |
I implemented this feature for the following situation. Suppose I want to download a book. I launch a search and (see PR #3989) obtain a number of book collections where this particular book is present. Then I start to download a torrent and find that it is incomplete with current peers. But do they have the book I need? Now I can overview the torrent and check. If no, I can try another one. |
yeah, then it's better to have path included. Another idea, is it better to move file size to the start of a line? that way I can quickly know what file (the piece contains) by simply looking from the end (of a string). |
@evsh Normally I like simple straight progress bar (one color), but your idea seems interesting and good for showing more detailed information without requiring extra space and I will like to give it a try. |
@evsh |
No, this is the default indentation from HTML |
Can I mark somehow the PR as not yet ready for merge? There is a bug in it: if I select a torrent with downloaded metadata and after that a torrent without it, the progress bar shows the progress of the former one after mouse moved out of it. |
just add something like |
Thank you all for the suggestion! I've worked around the bug by cleaning piece information in |
Fixed drawing error, now with light theme it should be correct. Tried to remove indentation from the list, but without success (can someone help me, please? How to change indentation in |
I'd prefer the Legend at the top of the tooltip. Also remove some spaces.
|
I decided to put the legend at the bottom because otherwise the tooltip text looks like a filled with water balloon, pinned by mouse pointer, which is not aesthetic. Could you, maybe, suggest how to avoid that look? Which spaces do you want to remove? |
No, but most relevant/important info should be first. For users it is more important to understand the graphic.
Before:
After:
|
@ngosang, @Chocobo1 What do you think about the following: we can show the "simple" tooltip (only legend), but if one of the modifier keys is pressed, we show another tooltip which contains only the file list. Additionally, we can hide file size with another modifier (or this is too much?) And the detailed tooltip does not contain the legend at all. This saves us from ugly text pyramid and from annoying spaces, but leaves the tooltips clear and readable. |
@evsh
agree.
too cumbersome. better add parentheses: |
Implemented the tooltips split. Activated table rendering by default for the detailed tooltip, because I think that vertically aligned cells look good. I did not add the suggested parentheses because, as to me, now the simple tooltip is clean and nice. |
Detailed tooltip caption is left-aligned now |
I think this is ready for merging. |
@ngosang: I've added 'white-space:nowrap' to the style of the size table cell. Seems to be working here. Could you test, please? But I agree with you that there has to be the thin unbreakable space between the number and the unit. |
namespace BitTorrent | ||
{ | ||
// Interval is defined via [first;last] | ||
template <class Index> |
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.
I don't like the use class keyword in this context.
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.
class → typename
I think the code is ok for merging. I did a test run and I noticed something different from a previous version I had tested. I don't know if this is intentional or not. When hovering over the progress/availability bars I don't see the relevant piece being highlighted! Or was it the file you were highlighting? In any case nothing gets highlighted now. |
This is a bug, which I can't reproduce. Could you look what happens inside of |
@sledgehammer999 there was a bug on one of the previous iterations: integer overflow which broke highlighting if position was far than 2GB from the beginning of a torrent. Do you observe something similar? |
and in that case |
|
||
constexpr IndexType last() const | ||
{ | ||
return m_first + m_size - 1; |
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.
Question: since begin() is the same as first() shouldn't end() be the same as last()?
I am under the impression you offer those for compatibility, right?
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.
You are right, this id for compatibility, and as such, end() must point to one after the last element.
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.
I suppose you mean last() and end() are both correct as they are now, right?
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.
The issue is that inside On another note:
|
There's something very wrong here. PieceIndexToImagePos transform {m_torrent->info(), m_image};
qCritical() << m_torrent->info().isValid(); it works!!! Vanilla code(without qCritical()) doesn't work. |
OMG, I thought that |
In addition to the current tooltip, which shows color legend, if user holds the Shift key during hovering we show another tooltip which contains a table of contents for the piece under the moue cursor. The table lists file sizes and names. If the cursor points to a part of a file which spans several pieces, those pieces are highlighted.
Fixed. |
BTW, GCC with -Wextra should warn about this error. Unfortunately, we do not pass neither -Wextra nor other warning options to it. |
@evsh So what was the problem? I was lost in recent code changes... |
@glassez |
I'll be able to check in a couple of hours. In the meantime, please take a look at my inline comment in PS: Aren't you able to define extra CXXFLAGS before compiling? |
If I modify cmake files, each git command will ask me to commit or stash those changes. |
Thanks for this.
Not true. It asks about that edited file only when you are rebasing or pulling a branch that modifies that same file. But this is solved easily. You do your necessary changes and stash them. Each time you clean your working dir you just need "git stash apply" to reapply them. The "apply" verb keeps the stash and doesn't delete it. |
Thank you for merging, and I very much thankful to all those who took part in the discussion! @sledgehammer999, I hope that you ran it one more time and that highlighting work. Does it?
And rebasing appears to be the most frequent operation :( Especially to amend a HEAD^n commit. |
@Chocobo1: I can't understand what is in your image. What is the dark rectangle? What is supposed to be there? |
Forgot to say, the box is supposed to show detailed information (holding down shift). |
So the detailed tooltips for the very first piece and the very last ones are empty. Is it correct? |
Not sure, it only happens on/near the border of the box. |
Fixed in #5339 |
A little improvements for the progress bars in the "General" tab of the torrent properties are proposed.
This works as follows: the following phrase is added to the tooltip "Hold Shift key for detailed information":
Here is an illustration:
And if this modifier (Shift) is pressed when tooltip is requested, detailed information about a pieces of a file under cursor is shown:
The detailed tooltip shows a table with sizes and names of the files in the piece under cursor.
In both images one can see highlighted (actually darkened) part of the torrent, occupied by the file under cursor.
This PR extends (and based on) PR #4867. The work continues in PR #4994