-
Notifications
You must be signed in to change notification settings - Fork 448
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
READY: Add tree-based view for torrent files in download dialog #6449
READY: Add tree-based view for torrent files in download dialog #6449
Conversation
ed9297d
to
5a75e85
Compare
5a75e85
to
7cffc67
Compare
Great addition! I’m aware that this PR is still WIP but I took a bit of time to see how it feels and looks. Except for selecting/deselecting files in the tree view of the ‘files’ tab on the download page, it seems to be functional. I have a few (mostly stylistic) suggestions: Tree view when starting a download:
Tree view when going to ‘files’ when downloading a torrent:
I don't think there's much work to be done there. Re-using the progress bar style of the main download list is definitely a good idea for now. I think using the default checkbox styles for now is ok. Customizing checkboxes is not really easy and requires us to make customized images for different states (e.g., checked/enabled, etc.). I would consider that an effort for a further iteration. |
Yep, there is an option for that. I'll try it.
Good point.
Well, you're not supposed to, really... Just check/uncheck the checkboxes - that is it. Selection is completely unnecessary in the case of "tree+checkboxes" solution: it requires the same amount of clicks to either click the checkboxes or first select them and then open the menu, etc. |
There is a 7-years old QT bug that forces everyone trying to customize checkboxes to use pictures instead of CSS colours:facepalm: |
cbe9cf8
to
beb52be
Compare
3899e06
to
6585ec1
Compare
retest this please |
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.
This PR improves UX, thank you for your work.
65d036b
to
7a67a6d
Compare
7a67a6d
to
490af92
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
fixes #1396
fixes #6443
I had to try at least three different ways of adding progress bars to QTreeWidget. This one is the safest, it does not trigger the dreaded "QObject deleted" error. Drawing progress bars by using
setItemWidget
is still slow, so it is disabled for torrents with more than 1k entries.The proper, fast and safe way to implement this kind of stuff is to move to use the Model-View architecture. However, that would prove too much work, at least for now.
Add download dialog (Note that sorting works, and that there is a counter for total selected files size and select/deselect all buttons are removed as unnecessary. "Download exists" label is removed too - the corresponding notification is now shown in the same "Loading metainfo" label)
UPDATE2:
I've tripped at least three different QT bugs while doing this 🤦 The whole thing is built from workarounds. We really need to switch to Model-View eventually.