Skip to content

Commit 60b9d32

Browse files
committed
Hide connections support on MacOS.
1 parent a74c371 commit 60b9d32

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/MacOSAppSupport/MAS_NSViewContextBase.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ static NSRect CreateRect (CGFloat viewHeight, const NUIE::Rect& rect)
8989
[CreateColor (pen.GetColor ()) set];
9090
NSBezierPath* bezierPath = [NSBezierPath bezierPath];
9191
[bezierPath setLineWidth:pen.GetThickness ()];
92+
[bezierPath setLineCapStyle:NSLineCapStyleRound];
9293
[bezierPath moveToPoint:CreatePoint (height, beg)];
9394
[bezierPath lineToPoint:CreatePoint (height, end)];
9495
[bezierPath stroke];
@@ -105,6 +106,7 @@ static NSRect CreateRect (CGFloat viewHeight, const NUIE::Rect& rect)
105106
[CreateColor (pen.GetColor ()) set];
106107
NSBezierPath* bezierPath = [NSBezierPath bezierPath];
107108
[bezierPath setLineWidth:pen.GetThickness ()];
109+
[bezierPath setLineCapStyle:NSLineCapStyleRound];
108110
[bezierPath moveToPoint:CreatePoint (height, p1)];
109111
[bezierPath curveToPoint:CreatePoint (height, p4) controlPoint1:CreatePoint (height, p2) controlPoint2:CreatePoint (height, p3)];
110112
[bezierPath stroke];

Sources/MacOSEmbeddingDemo/Application.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "MAS_IncludeCocoaHeaders.hpp"
88

99
#include "NUIE_NodeTree.hpp"
10+
#include "NUIE_FeatureSet.hpp"
1011
#include "BI_BuiltInNodes.hpp"
1112

1213
static const std::vector<NSString*> IconResourceNames = {
@@ -400,6 +401,7 @@ static void InitNodeTree (NUIE::NodeTree& nodeTree)
400401
[myWindow setContentView:contentView];
401402
[myWindow setDelegate:myWindowController];
402403

404+
NUIE::EnableFeature ("HideConnections", true);
403405
uiEnvironment.Init (&nodeEditor, contentView, 0, 0, windowRect.size.width, windowRect.size.height);
404406
[myWindow center];
405407
[myWindow makeKeyAndOrderFront:nil];

0 commit comments

Comments
 (0)