Re: How to change toolbar icon size?
- From: Diana Esch-Mosher <desch-mosher lanl gov>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: "Andrew E. Makeev" <andrew solvo ru>, gtkmm-list gnome org
- Subject: Re: How to change toolbar icon size?
- Date: Thu, 23 Dec 2004 12:56:54 -0700
Welll, this doesn't really help you if you are using the new UIManager.
You are stuck trying to use the create_icon(iconsize) method. But, I
could never quite figure out how to use this method . As an example I have
" <toolbar name='ToolBar'>"
" <toolitem action='ZoomIn'/>"
" <toolitem action='ZoomOut'/>"
" </toolbar>"
and
refActionGroup->add(Gtk::Action::create("ZoomIn", Stock::ZOOM_IN, "", "Zoom
In"), sigc::bind(sigc::mem_fun (*this, &TopLevel::onToolbarZoomItem),
ZOOM_IN));
What do I have to do to use the create_icon(iconsize) method? Anyone?
.... hence my back door method ...
Chris Vine wrote:
On Thursday 23 December 2004 09:12, Andrew E. Makeev wrote:
Hi,
What is alternative for deprecated Gtk::Toolbar->set_icon_size() method
if I would to change toolbar icons at runtime?
I normally size the image or other object that I am loading into the
Gtk::Toolbutton object. If you are using stock icons you would do something
like:
Gtk::Image* image = manage(new Gtk::Image(Gtk::Stock::CLEAR,
Gtk::ICON_SIZE_SMALL_TOOLBAR));
manage(new Gtk::ToolButton(*image));
You can register your own icon size with:
// a 22x22 pixel size
Gtk::IconSize::register_new("MY_BUTTON_SIZE", 22, 22);
Gtk::Image* image = manage(new Gtk::Image(Gtk::Stock::CLEAR,
Gtk::IconSize::from_name("MY_BUTTON_SIZE")));
If you are loading Gdk::Pixbufs into the image, look at its scale(),
scale_simple() and similar methods.
Chris
_______________________________________________
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]