Comment 21 for bug 968213

Revision history for this message
In , Pierre-bugzilla (pierre-bugzilla) wrote :

Ok, I managed to figure it out. I forgot a ".clutter_text." in there:

            this.label.clutter_text.line_wrap = true;
            this.label.clutter_text.line_wrap_mode = Pango.WrapMode.WORD_CHAR;
            this.label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;

I also needed to get it properly restricted to the given width using:

            let [labelMinHeight, labelNatHeight] = this.label.get_preferred_height(availWidth);

Unfortunately, the bounding containers didn't resize dynamically as I would have hoped, so I had to change "-shell-grid-item-size" in the css. That got things mostly working for two line objects (although it got center aligned, instead of top aligned, which is probably preferred). It still looked funky for three line objects though.

So more work is needed to get thing more dynamic. Some help from the experts would be welcome. :)