* too much spaces with Gtk.Button.Set_Image
@ 2022-07-03 21:39 Thomas
2022-07-05 3:18 ` Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Thomas @ 2022-07-03 21:39 UTC (permalink / raw)
hi :-)
i want to make an Image Button without text and without large borders.
when i use Gtk.Button.Set_Image, it makes spaces at 3 sides, and the
Image overflows at the 4th.
it depends on Gtk.Button.Get_Image_Position : it overflows at the side
where it would have been the text.
Gtk.Box.Get_Spacing (Get_Child (Get_Child (My_Button))) returns 2,
but Gtk.Box.Set_Spacing (Get_Child (Get_Child (My_Button))))), 0) does
not resolve the pb.
Gtk.Container.Get_Border_Width on any level of child of My_Button
returns 0.
i don't find how to remove these spaces.
do you think i should use Gtk.Container.Add instead of
Gtk.Button.Set_Image ?
previous authors have done that, but I feel like it's kind of a hack,
and I don't like it very much...
--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: too much spaces with Gtk.Button.Set_Image
2022-07-03 21:39 too much spaces with Gtk.Button.Set_Image Thomas
@ 2022-07-05 3:18 ` Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Thomas @ 2022-07-05 3:18 UTC (permalink / raw)
In article <[email protected]>,
Thomas <[email protected]> wrote:
> hi :-)
>
>
> i want to make an Image Button without text and without large borders.
>
>
>
> when i use Gtk.Button.Set_Image, it makes spaces at 3 sides, and the
> Image overflows at the 4th.
> it depends on Gtk.Button.Get_Image_Position : it overflows at the side
> where it would have been the text.
>
>
> i don't find how to remove these spaces.
>
>
>
> do you think i should use Gtk.Container.Add instead of
> Gtk.Button.Set_Image ?
>
> previous authors have done that, but I feel like it's kind of a hack,
> and I don't like it very much...
i gone back to Gtk.Container.Add.
it doesn't more overflow at the 4th side, and that's a good thing,
but i don't understand what's wrong with Gtk.Button.Set_Image.
i was wrong telling "too much spaces with Gtk.Button.Set_Image",
because it's not Set_Image which causes the spaces,
but it's the use of a Gtk_Image instead of a Gtk_Pixmap.
i don't understand more what's the difference between Gtk_Image and
Gtk_Pixmap.
Gtk.Misc.Get_Padding returns 0 0.
i have no other idea now.
it's better with Add than with Set_Image,
but it's not very nice because RAPID has not exactly the same behavior
with Gtk and with TclTk.
(2*4 pixels in a small button (27 pixels) is a big part.)
i cannot revert to Gtk_Pixmap because it is Obsolescent.
so i still need help, please :-)
--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-05 3:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03 21:39 too much spaces with Gtk.Button.Set_Image Thomas
2022-07-05 3:18 ` Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox