Author: mlytwyn
Date: Sat Jun 20 18:21:24 2015
New Revision: 38660

URL: http://svn.gna.org/viewcvs/gnustep?rev=38660&view=rev
Log:
Merge Source/Functions.m

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/Functions.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/Functions.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/Functions.m?rev=38660&r1=38659&r2=38660&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/Functions.m       
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/Functions.m       Sat Jun 
20 18:21:24 2015
@@ -44,7 +44,6 @@
 #import "AppKit/NSView.h"
 #import "AppKit/NSWindow.h"
 #import "AppKit/DPSOperators.h"
-#import "AppKit/NSBezierPath.h"
 
 char **NSArgv = NULL;
 
@@ -752,7 +751,6 @@
 
 /* Various functions for drawing bordered rectangles.  */
 
-// TODO: Should we retire NSDottedFrameRect in favor of NSFocusRingFrameRect?
 void NSDottedFrameRect(const NSRect aRect)
 {
   CGFloat dot_dash[] = {1.0, 1.0};
@@ -795,6 +793,14 @@
   NSRect rects[4];
   int i;
 
+  if (frameWidth == 0.0)
+    {
+      NSView *view = [GSCurrentContext() focusView];
+      NSSize aSize = [view convertSize: NSMakeSize(1.0, 1.0) fromView: nil];
+
+      frameWidth = (aSize.width + aSize.height) / 2.0;
+    }
+
   for (i = 0; i < 4; i++) 
     {
       NSDivideRect(remainder, &rects[i], &remainder, frameWidth, sides[i]);
@@ -810,6 +816,14 @@
   NSRect remainder = aRect;
   NSRect rects[4];
   int i;
+
+  if (frameWidth == 0.0)
+    {
+      NSView *view = [GSCurrentContext() focusView];
+      NSSize aSize = [view convertSize: NSMakeSize(1.0, 1.0) fromView: nil];
+
+      frameWidth = (aSize.width + aSize.height) / 2.0;
+    }
 
   for (i = 0; i < 4; i++) 
     {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to