void UpdateIconSelection() { Gdk.Pixbuf icon = null; if (iconNameEntry.Text.Length > 0) { icon = WidgetUtils.LoadIcon(iconNameEntry.Text, SelectedIconSize); } if (icon == null) { icon = WidgetUtils.MissingIcon; } previewIcon.Pixbuf = icon; }
void UpdateIconSelection() { labelWarningIcon.Visible = stockIconEntry.Text.Length > 0 && (!stockIconEntry.Text.StartsWith("gtk-")); Gdk.Pixbuf icon = null; if (stockIconEntry.Text.Length > 0) { icon = WidgetUtils.LoadIcon(stockIconEntry.Text, Gtk.IconSize.Menu); } if (icon == null) { icon = WidgetUtils.MissingIcon; } previewIcon.Pixbuf = icon; }
protected override void CreateIcons() { foreach (string s in StockIconHelper.StockIcons) { if (s != "-" && s != "|") { Gdk.Pixbuf pix = WidgetUtils.LoadIcon(s, Gtk.IconSize.Menu); if (pix != null) { AddIcon(s, pix, s); } } else { AddSeparator(s); } } }
public StockIconList() { foreach (PropertyInfo info in typeof(Gtk.Stock).GetProperties(BindingFlags.Public | BindingFlags.Static)) { if (info.CanRead && info.PropertyType == typeof(string)) { string name = (string)info.GetValue(null, null); AddIcon(name, WidgetUtils.LoadIcon(name, Gtk.IconSize.Menu), name); } } foreach (PropertyInfo info in GnomeStock.Properties) { if (info.CanRead && info.PropertyType == typeof(string)) { string name = (string)info.GetValue(null, null); AddIcon(name, WidgetUtils.LoadIcon(name, Gtk.IconSize.Menu), name); } } }