-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: improve GTK torrent piece size picker #6840
base: main
Are you sure you want to change the base?
Conversation
…t for up to 256MiB piece sizes
Thank you! |
Does this fix #5617? |
@tearfur Yes, thank you for pointing this out. Updated description. |
Might have to go into 4.0.x if the GTK client is actually broken in terms of piece selection but not sure if that functionality is essential enough to warrant it. This also begs the question: should the Qt client also go to combobox to keep things consistent? |
Unless @mikedld is opposed, I'm fine with merging this for 4.1.0 |
Have you looked into fixing it? I'd try that first, then change the UI. In theory I'm fine with this PR but I see piece size information is now duplicated on screen (same value displayed in both the label and the combobox) which isn't nice. And there's also that consistency concern pointed out by Pentaphon. |
If we do keep this new UI, I think it would be a little better visually for the |
@mikedld Yes, I did try to fix the scale ui. The problem is, with the number of possible piece sizes, the scale step becomes so small that it's not very easy to use. See the attached picture. As for the duplicate information, I can remove the piece size from the label. |
Not sure what I'm supposed to see on that picture, sorry... Does the below make it any easier for you to pick the value? --- a/gtk/MakeDialog.cc
+++ b/gtk/MakeDialog.cc
@@ -406,6 +406,7 @@ void MakeDialog::Impl::configurePieceSizeScale(uint32_t piece_size)
// the below lower & upper bounds would allow piece size selection between approx 1KiB - 64MiB
auto adjustment = Gtk::Adjustment::create(log2(piece_size), 10, 26, 1.0, 1.0);
piece_size_scale_->set_adjustment(adjustment);
+ piece_size_scale_->set_round_digits(0);
piece_size_scale_->set_visible(true);
}
|
@mikedld setting the |
@simplepad, have you tried the exact patch I've posted above? I saw a difference between GTK 3 and 4 in handing the |
Description
Replaced GtkScale with GtkComboBox. The scale was not really working as expected, it was impossible to pick a certain piece size due to implementation issues. This PR replaces it with GtkComboBox, like in qbit.
Also, instead of hiding it until the source is selected, I made it inactive. I think it looks a bit better.
Fixes #5617.
Also, enabled support for up to 256 MiB piece sizes, fixes #5955.
Some screenshots
Before:
Now: