From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gtk.Image.Gtk_Image
Date: Fri, 25 Mar 2022 21:34:28 +0100 [thread overview]
Message-ID: <t1l90i$1otm$1@gioia.aioe.org> (raw)
In-Reply-To: fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr
On 2022-03-25 20:37, Thomas wrote:
> In article <t1jr00$1ja4$1@gioia.aioe.org>,
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:
>
>> I am using Gtk_Image in Gtk_Box, it works perfectly well, and worked in
>> GTK 2 (I am using GTK 3).
>
> (Gtk_Pixmap were fully removed from GTK 3)
It is Gdk_Pixbuf now.
> afaiu, the specific thing about Gtk_Pixmap is that i need not to call
> Show on it, calling Show on its parent is enough.
No, I think that pixmap handles the Draw signal, so you do not need Show
because all rendering optimizations are turned off.
> but, I thought calling Show on a container was recursive on its childs,
> wrong?
It is recursive, but it affects only actual children. New children are
hidden by default. I think this is going to change in GTK 4.
> is it ok, or do you think i should avoid it anyway?
My understanding is that some widgets are optimized not to process
signals from input devices, e.g. Gtk_Label and Gtk_Image. Because
normally, you would not use keyboard or mouse buttons on them. But if
you need that, you add Gtk_Event_Box. If things work without it, then
leave it as is.
> if i should avoid it, is there an other Gtk_Bin that i could use, or do
> you think Gtk_Box is the only one i should use for this purpose?
I think any container is OK. I use Gtk_Box just because I want both
label and icon on the button.
Gtk_Fixed is bad because it breaks widget resizing protocol. If you
never resize (e.g. when changing the widget style, fonts, for example)
then Gtk_Fixed is just fine.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2022-03-25 20:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 12:55 Gtk.Image.Gtk_Image Thomas
2022-03-24 13:35 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-24 15:14 ` Gtk.Image.Gtk_Image Thomas
2022-03-24 15:47 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-24 18:40 ` Gtk.Image.Gtk_Image Thomas
2022-03-24 20:33 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25 1:53 ` Gtk.Image.Gtk_Image Thomas
2022-03-25 7:29 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25 19:37 ` Gtk.Image.Gtk_Image Thomas
2022-03-25 20:34 ` Dmitry A. Kazakov [this message]
2022-03-26 1:38 ` Gtk.Image.Gtk_Image Thomas
2022-03-26 8:59 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-26 17:32 ` Gtk.Image.Gtk_Image Thomas
2022-03-27 9:33 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-27 16:41 ` Gtk.Image.Gtk_Image Thomas
2022-03-27 17:34 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-30 2:58 ` Gtk.Image.Gtk_Image Thomas
2022-03-30 12:46 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox