-
Notifications
You must be signed in to change notification settings - Fork 226
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
Resize #7
Resize #7
Conversation
lists For now, you do it by selecting the list you want to grow/shrink and pressing [ to grow and ] to shrink, but this can easily be changed. This uses proportional growing/shrinking, just like the vertical -/+ does, i.e., [ multiplies the weight by 1.25 and ] divides the weight by 1.25. This perhaps should be changed, as it feels a little awkward, though the "weight" part of it is hard-coded into urwin, and changing that would not be easy. On the other hand, this isn't too hard to get used to, and it's pretty easy to get the sizes you want. All sizes are saved in the configuration file and reloaded in future uses. So technically, a picky user could set any weight he wants to suit his needs.
Hold on, there's a bug where it fails if you shrink one of the lists down to 0 columns. |
Cleaned up, merged. Thanks! |
This shouldn't have been merged. There is an issue. You can make one of the boxes so small so that you can't see anything in it, and then if you select it and press down arrow, it fails. Oh, and you forgot to mention the new theme in the release notes. |
I'm not sure how to fix it. Perhaps I should approach this from the other side and make downarrow work even when nothing is visible. |
Oh well, it's in now. Let's try and fix it. FWIW, down-arrow works for me even when nothing is visible--i.e. it activates an invisible box. (Urwid 0.9.9.2) A less-than-elegant fix would be a 'reset sidebar box sizes' button in the prefs. |
Actually, I'm inclined to say that this is a urwid bug. I have 0.9.9.1. Let me see if upgrading fixes it. Here is the full traceback:
You reproduce it by shrinking one of the boxes (say variables) down completely, which requires growing the other boxes, and then selecting that box ( By the way, one thing I noticed that we need to do is normalize the weights. They tend to grow very small, and if you resize enough times, they will eventually go to 0 due to floating point precision. But this is trivial to fix, and I will submit a patch for it. |
Actually, never mind about normalization. That was only necessary when I tried to use the column size as a limit, not 1/5 < width < 5, which obviously will never get too small or too big :) |
I just tried the git version of urwid, and the problem does not exist there. |
So, ok to keep this closed? |
Yes. This is clearly an urwid bug, and I for one have no problem running the dev version as a work around. |
This lets you resize the height of the variables, stack, and breakpoints lists. See the commit messages for more details, but basically you just enter the one you want to resize and press
[
to make it grow and]
to make it shrink.