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
LineBox: make side only if side elements present, fix pack #748
Conversation
* BUG: `LineBox().pack` was ignored nonexistent top/bottom. Switch to the backend (Pile) `pack` usage to get proper size * Semi-bug: in case of no side, empty elements was partially added (top and bottom) with fixed size == 1 (Bug urwid#337) * For consistency add right corner with width=0 if no right corner * Propagate default empty size for `pack` if widgets are optionally FIXED No size will be handled internally
Pull Request Test Coverage Report for Build 7543080965
💛 - Coveralls |
tests/test_line_box.py
Outdated
pressed = False | ||
|
||
with self.subTest("No left side elements -> no side"): | ||
l = urwid.LineBox(wrapped, tlcorner="", lline="", blcorner="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to remove corners when lline is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean it would be a nicer interface if we didn't, like with top and bottom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add it to make consistent with top and bottom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
LineBox().pack
was ignored nonexistent top/bottom. Switch to the backend (Pile)pack
usage to get proper sizeset_title
without title was not properly checked for top widget availability and caused exceptionpack
if widgets are optionally FIXED No size will be handled internallyFix #337
Checklist
master
orpython-dual-support
branchtox
successfully in local environment