3.8 invisible widget change breaks my app




Hi all,

I just upgraded to gtk+ 3.8 and am now being thwarted by one of the new
design changes. From the 'What's New in 3.8' notes:

   Invisible widgets now return a size of 0x0. This is an experimental
   change that makes GtkWidget::visible essentially behave the same way
   that "display: none" does in CSS. If you want the effect of CSS's
   "visibility: hidden", you can use a GtkNotebook with an empty page

I am trying to predetermine some sizes of label widgets without actually
displaying anything on the screen:

        GtkWidget *w;
        GtkRequisition grq;

        if ((w= gtk_label_new("my test string")) == (GtkWidget *) 0)
                return -1;
        gtk_widget_get_preferred_size(w, &grq, NULL);

This worked just fine in 3.6 but is now broken, as grq.width and grq.height 
are returned as 0.

How can I accomplish this now? If the answer is "you can't", then please
consider this a request to disable this 'experimental change'. ;->

Thanks!

Roger Davis


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]