Re: gtk-list Digest, Vol 130, Issue 25

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

 



Unfortunately, I cannot extract the sample for now. But found solution myself:
In position_func count preferred height of all GtkMenuItems in menu and run gtk_widget_set_size_request() with resulted height. Then menu will expanded to unscrollable menu, if possible. Inserting item to visible menu result hiding it, then this hack will works.

On Tue, Feb 24, 2015 at 6:00 PM, <gtk-list-request@xxxxxxxxx> wrote:
Send gtk-list mailing list submissions to
        gtk-list@xxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.gnome.org/mailman/listinfo/gtk-list
or, via email, send a message with subject or body 'help' to
        gtk-list-request@xxxxxxxxx

You can reach the person managing the list at
        gtk-list-owner@xxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-list digest..."


Today's Topics:

   1. Re: Size of GtkMenu (Rafa? Lu?y?ski)


----------------------------------------------------------------------

Message: 1
Date: Mon, 23 Feb 2015 23:50:41 +0100 (CET)
From: Rafa? Lu?y?ski    <digitalfreak@xxxxxxxxxxxxxxxxx>
To: gtk-list@xxxxxxxxx, "Konstantin P." <ria.freelander@xxxxxxxxx>
Subject: Re: Size of GtkMenu
Message-ID:
        <1415620991.41478.1424731842515.JavaMail.open-xchange@xxxxxxxxxxxxxxxxxxxxxxxxx>

Content-Type: text/plain; charset=UTF-8

Hello,

> Dnia 19 luty 2015 o 00:14 "Konstantin P." <ria.freelander@xxxxxxxxx>
> napisa?(a):
>
>  Hello. How I can request size change on GtkMenu? gtk_widget_queue_resize()
> does not working.
>  Let's describe a problem. After user clicked on a button, menu for it will
> requested from DBus, I am started asynchronously populate GtkMenu on finish
> request. And after population menu becomes will be very small (2-3 menuitems
> in height) with 2 arrows on top and bottom (But it is popuated correctly, all
> items on places). And will stays the same all its lifetime (before
> destruction).
>  But in very rare cases (when populating is very very fast) I can see normal
> full menu without an arrows (All 15 items is on screen).
>  Is there any way to force menu resize from arrows-version to full version? I
> tried gtk_widget_queue_resize(), but it not work.

gtk_widget_queue_resize() may not work because GtkMenu requires
some additional actions, see its static function menu_queue_resize().
But gtk_menu_shell_insert() and similar functions call it correctly
and should be sufficient.

Can you wait for the response from DBus and populate the menu
before it is displayed?

Can you provide the sample code?

Regards,

Rafal


------------------------------

Subject: Digest Footer

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list


------------------------------

End of gtk-list Digest, Vol 130, Issue 25
*****************************************

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux