i'm trying allow wrapping of text in gtk.cellrenderertext have small problem:
those rows large.
the code changed this:
cell = gtk.cellrenderertext(markup=0) cell.set_property("wrap_mode", pango.wrapmode.word) cell.set_property("wrap_width", 20)
and makes wrap, seemed make visual issue appear
i seem remember reading on blog @ planet gnome quite while ago. remember there height-for-width drawing model means when wrapping enabled gtklabel etc request enough height reflow text wrap-width if there more horizontal space available leaves loads of empty space when width wider. there fix i'm afraid can't remember @ moment, i'll try , find original post later.
i've tried can't find post, having read more i'm pretty sure problem. there discussion related gtktable doing similar things @ https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/825173 i've nasty feeling fix can't remember might have been turn off wrapping. guess possible notification when column width changes , make wrap-width correct width value that's bit of pain.
if can live column being fixed width, set expand
property of column false
, fixed-width
property true
set wrap-width
, width-chars
, max-width-chars
properties of renderer same value text wraps without space.
Comments
Post a Comment