Iñigo Serna wrote:
Hi all,
I'm experimenting with urwid in order to port an old program [1],
written using plain curses, and that nowdays is becoming a bit aged
due to the lack of flexibity of curses (no unicode, ugly UI code,
etc).
I've written a simple and quick proof of concept both to train myself
in urwid and to test the capabilities and speed of the library.
Using 0.9.8.
***test.py*** Lines 227-9. Class Panel, Method Display
I have a Frame whose body is a Columns widget with 2 elements, both
identical.
Each element contains a list of Text => "content".
If this Text List is wrapped inside a
ListBox(SimpleListWalker(content), it 's rendered correctly.
But if I embed it inside a Pile(content) or Filler(Pile(content),
height=h) it fails in Text.render method (widget.py:350).
Please try the attached patch.
Ian
Index: urwid/widget.py
===================================================================
--- urwid/widget.py (revision 127)
+++ urwid/widget.py (working copy)
@@ -1447,6 +1447,9 @@
cx, cy = canv.cursor
if cy >= maxrow:
canv.trim(cy-maxrow+1,maxrow-top-bottom)
+ if canv.rows() > maxrow:
+ canv.trim(0, maxrow)
+ return canv
canv.pad_trim_top_bottom(top, bottom)
return canv
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid