Re: Problem with icon in toolbar button
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: "J. Baltasar Garcia Perez-Schofield" <jbgarcia uvigo es>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Problem with icon in toolbar button
- Date: Tue, 26 Dec 2006 16:06:42 +0300
В Втр, 26/12/2006 в 13:44 +0100, J. Baltasar Garcia Perez-Schofield
пишет:
> Hi, there !
>
> Using Gtkmm 2.4, I have an icon to bbe used in a menu item and in a
> toolbar button:
>
> Gtk::Image *image21 = Gtk::manage(
> new Gtk::Image(Gtk::StockID("gtk-jump-to"),
> Gtk::IconSize( Gtk::ICON_SIZE_LARGE_TOOLBAR )
> ));
>
> Gtk::Image *image22 = Gtk::manage(
> new Gtk::Image( Gtk::StockID("gtk-jump-to"),
> Gtk::IconSize( Gtk::ICON_SIZE_MENU )
> ));
>
>
> They are used this way:
>
> btInsert = Gtk::manage(new class Gtk::ToolButton(*image21, "Insert"));
> menuitem2_menu->items().push_back(
> Gtk::Menu_Helpers::ImageMenuElem("Insert", *image22)
> );
>
> They do correspond to the same option, the first one in the toolbar
> (btInsert), and the second one in the main menu.
>
> The menu item works fine. However, the toolbar button (btInsert) icon
> (image21) does not appear at all when the toolbutton is visible. When
> the window is to small and the buttons are listed through a click in the
> arrow of extension for the toolbar, however, the icon appears correctly
> (small size).
1st - version 2.4 is supporting Gtk::Action that is much better to use
for creating menu and toolbar elements.
2nd - probably, image21->show() could help. But I can't be sure not
seeing your code.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]