Skip to content
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

Make MsgPopup scrollable #2120

Merged

Conversation

MichaelAug
Copy link
Contributor

This Pull Request fixes/closes #1138.

It changes the following:

  • Adds scrolling for tag annotations by adding scrolling to MsgPopups which are used to display tag annotations.

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@extrawurst
Copy link
Owner

somehow i cannot get this to work if I checkout your branch:

Screenflick.Movie.22.mp4

If gitui window shrinks below set height, scrollbar will correctly be
displayed and text will scroll correctly.

Fix panic when clamping width if f.size().width went below
MINIMUM_WIDTH.
@MichaelAug
Copy link
Contributor Author

The scrolling should work correctly now when shrinking the window

@extrawurst
Copy link
Owner

it only uses the original messages lines count and not the number of lines that happen to be shown when the text wraps at places because it is wider than the message box:
Screenshot 2024-03-19 at 18 16 07

CHANGELOG.md Outdated Show resolved Hide resolved
src/popups/msg.rs Outdated Show resolved Hide resolved
Now if the window shrinks below defined width, the message lines will
wrap correctly.

Allow words to be split (broken) to fit the rect size by using
wrap_maybrk.

Handle panic if msg is an empty string.
@MichaelAug
Copy link
Contributor Author

it only uses the original messages lines count and not the number of lines that happen to be shown when the text wraps at places because it is wider than the message box: Screenshot 2024-03-19 at 18 16 07

It should now use the correct width for text wrapping

@extrawurst
Copy link
Owner

looks good now! thanks @MichaelAug

@extrawurst extrawurst merged commit 5131aba into extrawurst:master Mar 24, 2024
17 of 18 checks passed
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
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.

View arbitrarily long multi-line annotations for git tags
2 participants