Re: Can I have toolbar button with different sizes?
- From: Gus Koppel <gtk spamkiller bytechase cx>
- To: <gtk-app-devel-list gnome org>
- Subject: Re: Can I have toolbar button with different sizes?
- Date: Sun, 28 Dec 2003 12:10:42 +0100
Dave Smith wrote:
On Saturday 27 December 2003 21:46, Maurizio Colucci wrote:
I did some experiments with gtk toolbars (actually in gtkmm :-) )
and I found that all toolbar buttons always have the size of the
largest button.
But Nautilus and evolution seem to have a toolbar with unevenly
sized buttons. How can I obtain such an effect?
"gtk_image_new_from_stock" allows you to create these sizes for each
stock icon:
GTK_ICON_SIZE_MENU
GTK_ICON_SIZE_SMALL_TOOLBAR
GTK_ICON_SIZE_LARGE_TOOLBAR
GTK_ICON_SIZE_BUTTON
GTK_ICON_SIZE_DND
GTK_ICON_SIZE_DIALOG
Using "gtk_image_new_from_file" allows you to create custom icons with
the sizes that you wish.
I think Maurizio wasn't referring to the size of the icons but to the
widths of the buttons at all. A toolbar behaves like a H/VBox with the
"homogeneous" flag set and I think the question was whether there's a
way to turn off this behaviour for toolbars.
I have tried this as well and I haven't found a way for this (as of
2.2). I believe toggling the "homogeneous" mode is a candidate for a
future feature addon of GtkToolbar. Correct me if I've just missed it.
However, you can use a H/VBox directly (instead of GtkToolbar) to put
your buttons into. This way you have full control over the "homogeneous"
behaviour. Furthermore you can put other things than just buttons into
your "toolbar" as well. You can also put it inside a GtkHandleBox to
make its dragable by the user. The result may look basically identical
to a GtkToolbar. Just the way of creating it is slightly more complex.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]