~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueWindow.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-02-05 10:49:36 UTC
  • mto: (10.3.1)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20120205104936-4ujoylapu24cquuo
Tags: upstream-2.8.6.3+dfsg
ImportĀ upstreamĀ versionĀ 2.8.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                        tree.RootPinAlwaysVisible = true;
96
96
                        tree.PinnedWatch = watch;
97
97
                        DocumentLocation location = editor.Document.OffsetToLocation (offset);
98
 
                        tree.PinnedWatchLine = location.Line + 1;
 
98
                        tree.PinnedWatchLine = location.Line;
99
99
                        tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;
100
100
                        
101
101
                        tree.AddValue (value);
204
204
                                sw.WidthRequest = -1;
205
205
                        }
206
206
                }
 
207
                
 
208
                protected override void OnSizeAllocated (Gdk.Rectangle allocation)
 
209
                {
 
210
                        const int edgeGap = 2;
 
211
                        int oldY, x, y;
 
212
                        
 
213
                        this.GetPosition (out x, out y);
 
214
                        oldY = y;
 
215
                        
 
216
                        Gdk.Rectangle geometry = DesktopService.GetUsableMonitorGeometry (Screen, Screen.GetMonitorAtPoint (x, y));
 
217
                        if (allocation.Height <= geometry.Height && y + allocation.Height >= geometry.Height - edgeGap)
 
218
                                y = geometry.Top + (geometry.Height - allocation.Height - edgeGap);
 
219
                        if (y < geometry.Top + edgeGap)
 
220
                                y = geometry.Top + edgeGap;
 
221
                        
 
222
                        if (y != oldY)
 
223
                                Move (x, y);
 
224
                        
 
225
                        base.OnSizeAllocated (allocation);
 
226
                }
207
227
        }
208
228
        
209
229