Skip to content

Add scrollbar in branchlist #417

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

Merged
merged 2 commits into from
Nov 12, 2020
Merged

Conversation

remique
Copy link
Contributor

@remique remique commented Nov 10, 2020

Fixes #392

No one seemed to be working on it. Apparently everything was already set up, just had to draw the actual scrollbar.

@WizardOhio24
Copy link
Contributor

Thanks for the PR.

In the commit message scrollbar (the other location where this is used), this highlights the right bar using THICK_VERTICAL (that is BorderType::Thick), to show the min and max of the bar (when the commit message is too long). Think this will be possible here? Perhaps set the right hand side to BorderType::Double if there is a scroll bar? Could pass in the symbol to draw to the draw_scrollbar function and use DOUBLE_VERTICAL for this.

Otherwise LGTM!

@remique remique force-pushed the branch_scroll branch 2 times, most recently from 84d44a8 to b3302a8 Compare November 11, 2020 18:47
@remique
Copy link
Contributor Author

remique commented Nov 11, 2020

Just had to remove Block border setting. It works just the same as commit message scrollbar and every other scrollbar-component.

@WizardOhio24
Copy link
Contributor

Hmm, the problem is that all popups have a thick border, and this one shouldn't really be different. I tried it with a double line, here's how it looks:
ScreenshotBranchList
Not bad. We could just use the double thick line for scroll-bars(everywhere), so as to be consistent and work with both popups and components in tabs.

@remique
Copy link
Contributor Author

remique commented Nov 12, 2020

Ah indeed I did not notice that popups have thicker border.

Just to clarify your last comment, all scrollbars in the app should have DOUBLE_VERTICAL bar no matter if it is a popup or a tab? Am I understanding correctly?

@WizardOhio24
Copy link
Contributor

Correct.

What I'm thinking is that all the scroll bars should be the same for consistency and they should work with both popups and components in tabs(so both single and thick). The only other option TUI offers is Double which looks alright on both. So I'd say then that all the scrollbars should use Double. (Just a small change in the scrollbar component)

@WizardOhio24
Copy link
Contributor

LGTM! @extrawurst merge?

@extrawurst extrawurst merged commit 2f3af71 into gitui-org:master Nov 12, 2020
@extrawurst
Copy link
Collaborator

@remique thanks for looking into this and @WizardOhio24 for the review - that's a huge help!

extrawurst pushed a commit that referenced this pull request May 27, 2021
* Add scrollbar in branchlist
* Change scrollbar symbol to DOUBLE_VERTICAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scrollbar in branchlist
3 participants