Re: Toolbar buttons
- From: "B.Hakvoort" <bart hakvoort be>
- To: halbtaxabo-debml yahoo com
- Cc: gtkmm-list gnome org
- Subject: Re: Toolbar buttons
- Date: Fri, 30 Dec 2005 19:06:54 +0100
Hi,
well, a quick and dirty solution would be creating an image from a
stockitem with a certain size and then create the toolbutton using this
image. Code could look like this:
Gtk::Image *image = manage( new Gtk::Image( Gtk::Stock::GOTO_LAST,
Gtk::ICON_SIZE_BUTTON ) );
Gtk::ToolButtin *toolbutton = Gtk::manage(new Gtk::ToolButton( *image,
"some text" ));
this should work, but i guess there is a more efficient way to create
toolbuttons with a static size from stock.
However.. i'm still not convinced if it's a good idea to override
theme-settings.
cheers,
plors
On Fri, 2005-12-30 at 09:19 -0800, Nick wrote:
> Yes, I see that there is an enum defined like this in
> enums.h:
> enum BuiltinIconSize
> {
> ICON_SIZE_INVALID,
> ICON_SIZE_MENU,
> ICON_SIZE_SMALL_TOOLBAR,
> ICON_SIZE_LARGE_TOOLBAR,
> ICON_SIZE_BUTTON,
> ICON_SIZE_DND,
> ICON_SIZE_DIALOG
> };
>
> Which does suggest that icon size can be specified.
> Maybe one calls some function with
> Gtk::ICON_SIZE_SMALL_TOOLBAR as a parameter.
> But which function? Just a little more documentation
> would be very helpful. Looking at the source, there's
> a function called gtk_toolbar_set_style but the
> parameter types are different...
>
> --- "B.Hakvoort" <bart hakvoort be> wrote:
>
> > I guess much of this depends on the current theme.
> > However IIRC it is
> > possible to change the button size. See also
> >
> http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/group__gtkmmEnums.html#gcda3014a34862afaf3a8f22b4197d25e
> >
> > cheers,
> >
> > plors
> >
> > On Fri, 2005-12-30 at 03:19 -0800, Nick wrote:
> > > The default toolbar buttons are big and take up a
> > lot
> > > of screen space. In comparison with toolbar
> > buttons in
> > > apps which do not use gtk, for example OpenOffice,
> > > they look clunky.
> > >
> > > Is there an option to generate more compact
> > buttons?
> > > The example in c.10 of the manual illustrates only
> > the
> > > big clunky buttons.
> > >
> > > _______________________________________________
> > > gtkmm-list mailing list
> > > gtkmm-list gnome org
> > > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
> >
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]