Merge pull request #145 from mono/0.1-gtk-labelwrapheightfix
[Xwt.Gtk] Fix wrap height calculation when changing Label's text
This commit is contained in:
Коммит
0de3afff1d
|
@ -79,10 +79,10 @@ namespace Xwt.GtkBackend
|
|||
|
||||
void HandleLabelDynamicSizeAllocate (object o, Gtk.SizeAllocatedArgs args)
|
||||
{
|
||||
int unused;
|
||||
int unused, oldHeight = wrapHeight;
|
||||
Label.Layout.Width = Pango.Units.FromPixels (args.Allocation.Width);
|
||||
Label.Layout.GetPixelSize (out unused, out wrapHeight);
|
||||
if (wrapWidth != args.Allocation.Width) {
|
||||
if (wrapWidth != args.Allocation.Width || oldHeight != wrapHeight) {
|
||||
wrapWidth = args.Allocation.Width;
|
||||
Label.QueueResize ();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче