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

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.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:
2487
2487
                        
2488
2488
                        int ox = 0, oy = 0;
2489
2489
                        if (GdkWindow != null)
2490
 
                                this.GdkWindow.GetOrigin (out ox, out oy);
 
2490
                                GdkWindow.GetOrigin (out ox, out oy);
2491
2491
                        
2492
2492
                        int w;
2493
2493
                        double xalign;
2494
 
                        provider.GetRequiredPosition (this, liw, out w, out xalign);
 
2494
                        provider.GetRequiredPosition (this, tipWindow, out w, out xalign);
2495
2495
                        w += 10;
2496
2496
                        
2497
2497
                        int x = xloc + ox + (int) textViewMargin.XOffset;
2498
 
                        Gdk.Rectangle geometry = Screen.GetUsableMonitorGeometry (Screen.GetMonitorAtPoint (x, oy + yloc));
 
2498
                        int y = yloc + oy;
 
2499
                        Gdk.Rectangle geometry = Screen.GetUsableMonitorGeometry (Screen.GetMonitorAtPoint (x, y));
2499
2500
                        
2500
2501
                        x -= (int) ((double) w * xalign);
 
2502
                        y += 10;
2501
2503
                        
2502
2504
                        if (x + w >= geometry.Right)
2503
2505
                                x = geometry.Right - w;
2504
2506
                        if (x < geometry.Left)
2505
2507
                                x = geometry.Left;
2506
2508
                        
2507
 
                        tipWindow.Move (x, yloc + oy + 10);
 
2509
                        int h = tipWindow.SizeRequest ().Height;
 
2510
                        if (y + h >= geometry.Bottom)
 
2511
                                y = geometry.Bottom - h;
 
2512
                        if (y < geometry.Top)
 
2513
                                y = geometry.Top;
 
2514
                        
 
2515
                        tipWindow.Move (x, y);
 
2516
                        
2508
2517
                        tipWindow.ShowAll ();
2509
2518
                }
2510
 
                
2511
2519
 
2512
2520
                public void HideTooltip ()
2513
2521
                {