Add Horizontal Scroll Bar to the File Browser
fixes #7879
Inviting @Gabrielxd195 to test this at https://lmms.io/download/pull-request/7913
I tested it, and it seems to work! The scrolling feels a little sensitive to me
@AW1534 That's neat, it does its job, and files located in long paths will now be visible. The only problem (not so serious) is that the bar doesn't automatically advance as you open folders. You can resize the search bar, but it's more a matter of convenience, since it's very common to navigate with the arrow keys.
Try it, navigate only with the arrow keys without resizing the search bar, and you'll see that when you want to centralize the files, pressing the "down" key to continue browsing will return the bar to the beginning and not stay in the center or where you left it.
https://github.com/user-attachments/assets/70fe9248-4747-4298-8bb5-ab880bd3a3a8
@Gabrielxd195 also goes at the start when click down
@AW1534 how difficult would it be to resolve the issue @Gabrielxd195 mentioned? I am also okay with moving forward with the PR and fixing it later, up to you.
@AW1534 Personally, I would have liked them to fix this bug even if it took them more time, because LMMS is riddled with small, accumulated bugs that make it look unstable. And since there are more important things than this simple problem, if they merge this without fixing this small bug and leave it for another PR, I don't think they'll fix it immediately. Now, if nothing can be done, then merge this PR, but please make another PR so that the implemented feature doesn't look incomplete.
@firiox That's right, when you press the down key, the bar returns to the top, and that's very annoying.
@AW1534 how difficult would it be to resolve the issue @Gabrielxd195 mentioned? I am also okay with moving forward with the PR and fixing it later, up to you.
I'd assume it's not too difficult, I haven't looked into it. I just haven't had much time at all to code lately. I'll look into it this weekend if I get the chance.
The scroll bar also jumps back to the left when an item is clicked. If there's no built in option for this, I suppose you could wrap the whole tree view in a separate QScrollArea and somehow connect to QHeaderView::sectionResized to update the size. Feels complicated though.