[Gimp-developer] Change size and ratio of Gimp Preview

Nicolás Serrano Martínez Santos nserrano at iti.upv.es
Wed Apr 16 02:15:40 PDT 2008


Hi! I'm trying to develop an interface of a plugin and I would like  
to use a rectangular gimp preview widget. Despite I've been looking  
over the documentation of this class and the parents in GTK+ the  
widgets is always square.

In the code of gimppreview at gimp_preview_init i've find this:

   if (gtk_widget_get_direction (GTK_WIDGET (preview)) ==  
GTK_TEXT_DIR_RTL)
     xalign = 1.0;

   preview->frame = gtk_aspect_frame_new (NULL, xalign, 0.0, 1.0, TRUE);
   gtk_frame_set_shadow_type (GTK_FRAME (preview->frame),  
GTK_SHADOW_NONE);
   gtk_box_pack_start (GTK_BOX (preview), preview->frame, TRUE, TRUE,  
0);
   gtk_widget_show (preview->frame);

Can I access to "preview->frame" from the plugin and change the  
aspect of the preview widget? Is there any way of doing this from  
another way?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-developer/attachments/20080416/f0cd2f20/attachment.html 


More information about the Gimp-developer mailing list