[nemerle] r8423 committed - 1. Fixed hints for multiple screen env....

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 3, 2009, 2:24:22 PM11/3/09
to nemer...@googlegroups.com
Revision: 8423
Author: igor.tkachev
Date: Tue Nov 3 11:23:41 2009
Log: 1. Fixed hints for multiple screen env.
2. Fixed right hint alignment.
http://code.google.com/p/nemerle/source/detail?r=8423

Modified:

/nemerle/trunk/VsIntegration/Nemerle.VisualStudio/GUI/WpfHint/HintWindow.xaml.cs

=======================================
---
/nemerle/trunk/VsIntegration/Nemerle.VisualStudio/GUI/WpfHint/HintWindow.xaml.cs
Tue Nov 3 08:42:10 2009
+++
/nemerle/trunk/VsIntegration/Nemerle.VisualStudio/GUI/WpfHint/HintWindow.xaml.cs
Tue Nov 3 11:23:41 2009
@@ -182,8 +182,8 @@
var rect = hintRoot.ActiveRect;

var size = new Size(ActualWidth * dx, ActualHeight * dy);
- var scrSize = new Size(SystemParameters.PrimaryScreenWidth * dx,
- SystemParameters.PrimaryScreenHeight * dy);
+ var scrSize = new Size(SystemParameters.VirtualScreenWidth * dx,
+ SystemParameters.VirtualScreenHeight * dy);

var pos = rect.BottomLeft;
if (rect.Bottom + size.Height > scrSize.Height)
@@ -195,10 +195,13 @@
{
pos.X = scrSize.Width - size.Width;
}
+
+ if (pos.Y < 0) pos.Y = 0;
+ if (pos.X < 0) pos.X = 0;

// update location
this.Left = pos.X / dx;
- this.Top = pos.Y / dy;
+ this.Top = pos.Y / dy;
}

#endregion

Reply all
Reply to author
Forward
0 new messages