public static void SetTextColor(this NSButton button, NSColor textColor)
 {
     NSMutableAttributedString attrTitle = new NSMutableAttributedString(button.AttributedTitle);
     NSUInteger len = attrTitle.Length;
     NSRange range = new NSRange(0, len);
     attrTitle.AddAttributeValueRange(NSAttributedString_AppKitAdditions.NSForegroundColorAttributeName, textColor, range);
     attrTitle.FixAttributesInRange(range);
     button.AttributedTitle = attrTitle;
     attrTitle.Release();
 }
Esempio n. 2
0
 public void setFillColor(NSColor color)
 {
     this.fillColor.SafeRelease();
     this.fillColor = color;
     this.fillColor.SafeRetain();
 }
Esempio n. 3
0
 public void setStrokeColor(NSColor color)
 {
     this.strokeColor.SafeRelease();
     this.strokeColor = color;
     this.strokeColor.SafeRetain();
 }
Esempio n. 4
0
 public void setColor(NSColor aColor)
 {
     this.setStrokeColor(aColor);
     this.setFillColor(this.strokeColor.ColorWithAlphaComponent(0.2f));
 }