[Monodevelop-patches-list] r2351 - trunk/MonoDevelop/Core/src/MonoDevelop.Dock

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Tue Mar 15 05:13:20 EST 2005


Author: lluis
Date: 2005-03-15 05:13:20 -0500 (Tue, 15 Mar 2005)
New Revision: 2351

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItemGrip.cs
Log:
2005-03-15  Lluis Sanchez Gual <lluis at novell.com>

	* DockItemGrip.cs: Redraw the grip if the title or the icon changes.
	Added some padding between the icon and the label.



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog	2005-03-14 23:35:35 UTC (rev 2350)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog	2005-03-15 10:13:20 UTC (rev 2351)
@@ -1,3 +1,8 @@
+2005-03-15  Lluis Sanchez Gual <lluis at novell.com>
+
+	* DockItemGrip.cs: Redraw the grip if the title or the icon changes.
+	Added some padding between the icon and the label.
+
 2005-03-14  Lluis Sanchez Gual <lluis at novell.com>
 
 	* DockItem.cs: Added property for getting the default position.

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItemGrip.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItemGrip.cs	2005-03-14 23:35:35 UTC (rev 2350)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItemGrip.cs	2005-03-15 10:13:20 UTC (rev 2351)
@@ -70,6 +70,10 @@
 					icon = RenderIcon (item.StockId, IconSize.Menu, "");
 				return icon;
 			}
+			set {
+				icon = value;
+				QueueDraw ();
+			}
 		}
 		
 		public new DockItem Item {
@@ -123,6 +127,7 @@
 				title = value;
 				if (layout != null)
 					layout.SetMarkup (Title);
+				QueueDraw ();
 			}
 		}
 		
@@ -170,7 +175,7 @@
 		{
 			switch (name) {
 			case "StockId":
-				icon = RenderIcon (item.StockId, IconSize.Menu, "");
+				Icon = RenderIcon (item.StockId, IconSize.Menu, "");
 				break;
 			case "LongName":
 				Title = item.LongName;
@@ -220,10 +225,10 @@
 					pixbufRect.X = titleArea.X + titleArea.Width - pixbufRect.Width;
 				} else {
 					pixbufRect.X = titleArea.X;
-					titleArea.X += pixbufRect.Width + 1;
+					titleArea.X += pixbufRect.Width + 4;
 				}
 				
-				titleArea.Width -= pixbufRect.Width - 1;
+				titleArea.Width -= pixbufRect.Width - 4;
 				pixbufRect.Y = titleArea.Y + (titleArea.Height - pixbufRect.Height) / 2;
 
 				if (evnt.Area.Intersect (pixbufRect, out exposeArea)) {




More information about the Monodevelop-patches-list mailing list