Author: everaldo
Date: 2008-01-23 07:59:39 -0500 (Wed, 23 Jan 2008)
New Revision: 93648

Added:
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
Modified:
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/ChangeLog
Log:
2008-01-23  Everaldo Canuto  <[EMAIL PROTECTED]>

        * LabelPainter.cs: Added.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/ChangeLog
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/ChangeLog
        2008-01-23 12:56:59 UTC (rev 93647)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/ChangeLog
        2008-01-23 12:59:39 UTC (rev 93648)
@@ -1,3 +1,7 @@
+2008-01-23  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * LabelPainter.cs: Added.
+
 2008-01-22  Everaldo Canuto  <[EMAIL PROTECTED]>
 
        * LinkLabelPainter.cs: Change Draw method to virtual.

Added: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
  2008-01-23 12:56:59 UTC (rev 93647)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
  2008-01-23 12:59:39 UTC (rev 93648)
@@ -0,0 +1,52 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007 Novell, Inc.
+//
+// Authors:
+//     Everaldo Canuto ([EMAIL PROTECTED])
+
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Theming.Default
+{
+       internal class LabelPainter
+       {
+               public LabelPainter ()
+               {
+               }
+
+               public virtual void Draw (Graphics dc, Rectangle 
clip_rectangle, Label label) 
+               {               
+                       label.DrawImage (dc, label.Image, 
label.ClientRectangle, label.ImageAlign);
+
+                       if (label.Enabled) {
+                               dc.DrawString (label.Text, label.Font, 
ThemeEngine.Current.ResPool.GetSolidBrush (label.ForeColor), clip_rectangle, 
label.string_format);
+                       } else {
+                               ControlPaint.DrawStringDisabled (dc, 
label.Text, label.Font, label.BackColor, clip_rectangle, label.string_format);
+                       }
+               }
+
+               public virtual Size DefaultSize {
+                       get { return new Size (100, 23); }
+               }
+       }
+}
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to