Re: How to get Gtk::Stock::APPLY icon back in 3.12?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2014-08-31 at 16:10 +0200, Stefan Salewski wrote:
> I have used the green checkmark icon button up to 3.10 release.
> (in toolbar,http://www.ssalewski.de/PetEd.html.en )
> 
> Since 3.12 it is not available any more, for a fast fix I replaced
> 
> #@minor_grid_select = Gtk::RadioToolButton.new(@major_grid_select, Gtk::Stock::APPLY)
> 
> with these two lines
> 
> @minor_grid_select = Gtk::RadioToolButton.new(@major_grid_select)
> @minor_grid_select.set_icon_name("list-add")
>  
> So it works again, but now I have a blue "cross" icon. I am not an
> artist, so I do not want to draw my own icons. Is there an easy way to
> get the green checkmark back?
> 

OK, after some googling I found a solution -- hope is it good enough.

Instead of the green checkmarks now I am using plain radio buttons:

@major_grid_select = Gtk::RadioButton.new(nil)
@major_grid_select_item = Gtk::ToolItem.new
@major_grid_select_item.add(@major_grid_select)

And toggle buttons in toolbar are now made this way:

@grid_snap = Gtk::ToggleButton.new
icon = Gio::ThemedIcon.new("list-add-symbolic", :default_fallback => true)
@grid_snap.set_image(Gtk::Image.new(:gicon => icon, :size => Gtk::IconSize::IconSize::MENU))
@grid_snap_item = Gtk::ToolItem.new
@grid_snap_item.add(@grid_snap)

And the items are added to the toolbar.


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux