Author: mkrueger
Date: 2008-02-13 07:42:12 -0500 (Wed, 13 Feb 2008)
New Revision: 95572

Modified:
   trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
   
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
Log:
* Mono.TextEditor/TextEditor.cs: Changed scrolling a bit.

Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-13 
12:04:48 UTC (rev 95571)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-13 
12:42:12 UTC (rev 95572)
@@ -1,5 +1,9 @@
 2008-02-13  Mike Krüger <[EMAIL PROTECTED]> 
 
+       * Mono.TextEditor/TextEditor.cs: Changed scrolling a bit.
+
+2008-02-13  Mike Krüger <[EMAIL PROTECTED]> 
+
        * Mono.TextEditor/TextViewMargin.cs, 
Mono.TextEditor/FoldMarkerMargin.cs,
          Mono.TextEditor/IMargin.cs, Mono.TextEditor/TextEditor.cs,
          Mono.TextEditor/BookmarkMargin.cs, Mono.TextEditor/GutterMargin.cs:

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-02-13 12:04:48 UTC (rev 95571)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-02-13 12:42:12 UTC (rev 95572)
@@ -139,14 +139,14 @@
                                }
                                DoFlipBuffer ();
                                this.buffer.DrawDrawable (Style.BackgroundGC 
(StateType.Normal), 
-                                                         flipBuffer,
+                                                         this.flipBuffer,
                                                          0, from, 
                                                          0, to, 
                                                          Allocation.Width, 
Allocation.Height - from - to);
                                if (delta > 0) {
-                                       this.QueueDrawArea (0, 
Allocation.Height - delta, Allocation.Width, delta + this.LineHeight);
+                                       RenderMargins (buffer, new 
Gdk.Rectangle (0, Allocation.Height - delta, Allocation.Width, delta + 
this.LineHeight));
                                } else {
-                                       this.QueueDrawArea (0, 0, 
Allocation.Width, -delta + this.LineHeight);
+                                       RenderMargins (buffer, new 
Gdk.Rectangle (0, 0, Allocation.Width, -delta + this.LineHeight));
                                }
                                GdkWindow.DrawDrawable (Style.BackgroundGC 
(StateType.Normal), 
                                                        buffer,
@@ -669,15 +669,8 @@
                        return this.textViewMargin.GetWidth (text);
                }
                
-               double oldVadjustment = 0;
-               protected override bool OnExposeEvent (Gdk.EventExpose e)
+               void RenderMargins (Gdk.Drawable win, Gdk.Rectangle area)
                {
-                       Gdk.Drawable  win  = buffer;
-                       Gdk.Rectangle area = e.Area;
-                       if (oldRequest != Splitter.LineCount * this.LineHeight) 
{
-                               SetAdjustments ();
-                               oldRequest = Splitter.LineCount * 
this.LineHeight;
-                       }
                        int reminder  = 
(int)this.textEditorData.VAdjustment.Value % LineHeight;
                        int firstLine = 
(int)(this.textEditorData.VAdjustment.Value / LineHeight);
                        int startLine = area.Top / this.LineHeight;
@@ -704,7 +697,18 @@
                                }
                                curY += LineHeight;
                        }
+               }
+               
+               double oldVadjustment = 0;
+               protected override bool OnExposeEvent (Gdk.EventExpose e)
+               {
+                       if (oldRequest != Splitter.LineCount * this.LineHeight) 
{
+                               SetAdjustments ();
+                               oldRequest = Splitter.LineCount * 
this.LineHeight;
+                       }
                        
+                       RenderMargins (buffer, e.Area);
+                       
                        e.Window.DrawDrawable (Style.BackgroundGC 
(StateType.Normal), 
                                             buffer,
                                             e.Area.X, e.Area.Y, e.Area.X, 
e.Area.Y, 

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

Reply via email to