-
Notifications
You must be signed in to change notification settings - Fork 3
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Usage Tips #29
Comments
The reason for the following is: An egui window with a certain width and frame will cause the last character of the terminal to be cut off. If you are creating an egui context with a fixed width and no frame, make it a multiple of the font size. So if you have a font size of 16, and you want a terminal 20 characters wide, you can set the width to 16*20=320. If you want to add an egui frame to the context containing the ratatui terminal, I recommend adding a buffer to the preceding value to account for the Frame margin. So if you have a frame, font size 16, and a terminal 20 characters wide- then use a buffer value a bit lower than the font size, so we can use 14 (Might have to play around with it). Thus the size should be 16*20 + 14 = 334. For better effect, modify the Frame properties, see: https://docs.rs/egui/latest/egui/containers/struct.Frame.html Sample Code:
OR
|
If you need to have a ratatui terminal and another egui widget in the same window, you should wrap both into an egui container. This is because egui_ratatui works by always filling it's own context completely, nothing else can be added to the context directly containing a ratatui terminal.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
If I find ways that make using the library better, I will document them here. Later I will make a better source but this is it for now.
The text was updated successfully, but these errors were encountered: