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

[enhancement] status: preserve horizontal scroll across updates #494

Closed
StanAngeloff opened this Issue Sep 3, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@StanAngeloff

This is related to #178. I tried to solve it again, but failed to do so. This has really been annoying me on projects with long directory paths. If the status widget is not wide enough to fit a filename, a horizontal scroll bar will appear. Scrolling to the right to reveal the filename and then selecting a different file from the list resets the horizontal scroll position.

Demo

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Sep 27, 2015

Member

Ugh, I tried making this work but it looks like Qt is doing something automatically when the item is clicked. I'd like to get this working if possible. I hope there's a way to do it..

Member

davvid commented Sep 27, 2015

Ugh, I tried making this work but it looks like Qt is doing something automatically when the item is clicked. I'd like to get this working if possible. I hope there's a way to do it..

@StanAngeloff

This comment has been minimized.

Show comment
Hide comment
@StanAngeloff

StanAngeloff Sep 28, 2015

Same here, I thought I nailed it in #178 and then gave it another go a month ago, still not found what's causing it. Bummer.

Same here, I thought I nailed it in #178 and then gave it another go a month ago, still not found what's causing it. Bummer.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Oct 5, 2015

Member

I think I found a crucial missing ingredient.. self.setAutoScroll(False) and then a few extra bits to store/restore the horizontol scroll. I think I should have something shortly...

Member

davvid commented Oct 5, 2015

I think I found a crucial missing ingredient.. self.setAutoScroll(False) and then a few extra bits to store/restore the horizontol scroll. I think I should have something shortly...

@davvid davvid closed this in f3b01df Oct 5, 2015

@StanAngeloff

This comment has been minimized.

Show comment
Hide comment
@StanAngeloff

StanAngeloff Oct 5, 2015

Works great! 🌟 All I need to do now is unlearn to use the scroll wheel after each click.

Works great! 🌟 All I need to do now is unlearn to use the scroll wheel after each click.

@PetrGlad

This comment has been minimized.

Show comment
Hide comment
@PetrGlad

PetrGlad May 23, 2018

Contributor

There is a problem with this behavior: if you scroll right to see ends of long paths and then scroll vertically to files closer to project root then items will look empty.

Contributor

PetrGlad commented May 23, 2018

There is a problem with this behavior: if you scroll right to see ends of long paths and then scroll vertically to files closer to project root then items will look empty.

PetrGlad added a commit to PetrGlad/git-cola that referenced this issue May 23, 2018

status: Scroll current item into view when selection changes
When moving selection up/down with keyboard in a long file list the
selected item goes out of view and there's no way to tell what file the
current diff corresponds to.
This change ensures that latest selected item is always visible.
The horizontal scrolling is preserved as it was implemented before.

See also issue #494 and pull request #178 for related discussion.

Signed-off-by: Petr Gladkikh <petrglad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment