예제 #1
0
 Pango.Layout GetLayout(Gtk.Widget widget)
 {
     return(widget.CreatePangoLayout(string.Empty));
 }
예제 #2
0
 	//TODO stop using this? Doesn't seem to be working for spin buttons anymore (which were updated OTM)
   public static int TextWidth (Widget widget, string text, int margins) {
   	Pango.Layout layout = widget.CreatePangoLayout(text);
   	int width, height;
   	layout.GetPixelSize(out width, out height);
   	return width + margins;
   }