コード例 #1
0
        static Gtk.IconSet MakeIcons(Wrappers.Renderers.Renderer renderer, string detail)
        {
            Gtk.IconSet    s = new Gtk.IconSet();
            Gtk.IconSource source;

            renderer.Detail = detail;

            Gtk.IconSize[] sizes = new Gtk.IconSize[] {
                Gtk.IconSize.Button,
                Gtk.IconSize.Dialog,
                Gtk.IconSize.Dnd,
                Gtk.IconSize.LargeToolbar,
                Gtk.IconSize.Menu,
                Gtk.IconSize.SmallToolbar
            };

            for (int i = 0; i < sizes.Length; ++i)
            {
                source = new Gtk.IconSource();

                int width, height;
                Gtk.Icon.SizeLookup(sizes[i], out width, out height);

                source.Pixbuf              = renderer.Icon(width);
                source.Size                = sizes[i];
                source.StateWildcarded     = true;
                source.DirectionWildcarded = true;
                source.SizeWildcarded      = false;

                s.AddSource(source);
            }

            return(s);
        }
コード例 #2
0
 static Gtk.IconSet MakeIcons(Wrappers.Renderers.Renderer renderer)
 {
     return(MakeIcons(renderer, null));
 }