[Monodevelop-patches-list] r869 - in trunk/MonoDevelop/src/Main/Base: Gui/Dialogs Services
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Feb 11 15:19:12 EST 2004
Author: tberman
Date: 2004-02-11 15:19:12 -0500 (Wed, 11 Feb 2004)
New Revision: 869
Modified:
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs
Log:
fix icon size in NFD
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs 2004-02-11 05:01:58 UTC (rev 868)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs 2004-02-11 20:19:12 UTC (rev 869)
@@ -76,7 +76,7 @@
int i = 0;
Hashtable tmp = new Hashtable(icons);
foreach (DictionaryEntry entry in icons) {
- Gdk.Pixbuf bitmap = iconService.GetBitmap(entry.Key.ToString());
+ Gdk.Pixbuf bitmap = iconService.GetBitmap(entry.Key.ToString(), Gtk.IconSize.LargeToolbar);
if (bitmap != null) {
smalllist.Add(bitmap);
imglist.Add(bitmap);
@@ -171,7 +171,7 @@
foreach (TemplateItem item in (ArrayList)((Gtk.TreeStore)mdl).GetValue (iter, 2)) {
//templateStore.AppendValues (item.Name, item.Template);
- TemplateView.AddIcon(new Gtk.Image(iconService.GetBitmap (item.Template.Icon)), item.Name, item.Template);
+ TemplateView.AddIcon(new Gtk.Image(iconService.GetBitmap (item.Template.Icon, Gtk.IconSize.Dnd)), item.Name, item.Template);
}
okButton.Sensitive = false;
}
Modified: trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs 2004-02-11 05:01:58 UTC (rev 868)
+++ trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs 2004-02-11 20:19:12 UTC (rev 869)
@@ -253,8 +253,14 @@
/// <exception cref="ResourceNotFoundException">
/// Is thrown when the GlobalResource manager can't find a requested resource.
/// </exception>
- public Gdk.Pixbuf GetIcon(string name)
+
+ public Gdk.Pixbuf GetIcon (string name)
{
+ return GetIcon (name, Gtk.IconSize.Button);
+ }
+
+ public Gdk.Pixbuf GetIcon (string name, Gtk.IconSize size)
+ {
string stockid = GetStockId (name);
if (stockid != null) {
Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (stockid);
@@ -265,7 +271,7 @@
Gtk.Widget.DefaultStyle.Handle,
(int) Gtk.TextDirection.None,
(int) Gtk.StateType.Normal,
- (int) Gtk.IconSize.Button,
+ (int) size,
IntPtr.Zero, null);
return (Gdk.Pixbuf) GLib.Object.GetObject(raw_ret);
}
@@ -288,10 +294,16 @@
/// <exception cref="ResourceNotFoundException">
/// Is thrown when the GlobalResource manager can't find a requested resource.
/// </exception>
- public Gdk.Pixbuf GetBitmap(string name)
+
+ public Gdk.Pixbuf GetBitmap (string name)
{
+ return GetBitmap (name, Gtk.IconSize.Button);
+ }
+
+ public Gdk.Pixbuf GetBitmap(string name, Gtk.IconSize size)
+ {
// Try stock icons first
- Gdk.Pixbuf pix = GetIcon (name);
+ Gdk.Pixbuf pix = GetIcon (name, size);
if (pix == null) {
// Try loading directly from disk then
pix = new Gdk.Pixbuf("../data/resources/icons/" + name);
More information about the Monodevelop-patches-list
mailing list