private GetIcon ( string name, int size ) : Gdk.Pixbuf | ||
name | string | |
size | int | |
return | Gdk.Pixbuf |
public static Gdk.Pixbuf GetIcon(string name, int size) {
IconTheme icon_theme = new IconTheme();
icon_theme.AppendSearchPath(Path.Combine(UI.AssetsPath, "icons"));
try {
return icon_theme.LoadIcon(name, size, IconLookupFlags.GenericFallback);
} catch {
try {
return icon_theme.LoadIcon("gtk-image-missing", size, IconLookupFlags.GenericFallback);
} catch {
return null;
}
}
}
UIHelpers::GetIcon ( string name ) : |
private void CreateAnimationFrames() { this.animation_frames = new Icon[] { UIHelpers.GetIcon("process-syncing-i"), UIHelpers.GetIcon("process-syncing-ii"), UIHelpers.GetIcon("process-syncing-iii"), UIHelpers.GetIcon("process-syncing-iiii"), UIHelpers.GetIcon("process-syncing-iiiii") }; }