-
Notifications
You must be signed in to change notification settings - Fork 63
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
Reloading config does not affect layout #321
Comments
Quickly tried to hack this together, and realized that for alignment we pad the lines so that they actually contain whitespace. Toggling the config to |
Hm, it seems like we may need to remove those whitespace in lines, yes. I know I should've asked this in the aligned layout PR, but couldn't we use the old
IIRC in the old implementation, when rendering the line for "blah blah ...", we start rendering from column 6, and the follow-up lines can continue from column 0. We use the same idea, except we start rendering from column 0, but move the line to column 6. That should automatically give us this rendering:
In other words, we change where we start drawing Am I missing anything? |
@osa1, Just checked and the whitespace only affects the nick (being padded for right alignment). The line wrapping actually does not draw whitespace, but decides where to draw, as you described. I will put up a PR to fix that |
More info: |
Instead of applying padding to the actual data in the line buffers, this applies the correct padding on the fly during line height calculation and drawing. Not a very good solution since I did this in order to be able to switch layouts on the fly (osa1#321) but it still doesn't work because we don't always align every line (i.e topic line, server stuff).
* Message alignment on draw Instead of applying padding to the actual data in the line buffers, this applies the correct padding on the fly during line height calculation and drawing. Not a very good solution since I did this in order to be able to switch layouts on the fly (osa1#321) but it still doesn't work because we don't always align every line (i.e topic line, server stuff). * Change alignment on the fly after reloading from config * Fixed unit test
If you change the msg area layout in your config (e.g
layout: aligned
) and use the command/reload
it will not change the layout until restarting Tiny.This can either be removed or fixed. Fixing may help solve #318, which will need the ability to toggle the layout based on window width.
The text was updated successfully, but these errors were encountered: