Alexandre Lision | 7f8351b | 2015-08-20 11:43:37 -0400 | [diff] [blame] | 1 | /* |
Alexandre Lision | 9fe374b | 2016-01-06 10:17:31 -0500 | [diff] [blame^] | 2 | * Copyright (C) 2015-2016 Savoir-faire Linux Inc. |
Alexandre Lision | 7f8351b | 2015-08-20 11:43:37 -0400 | [diff] [blame] | 3 | * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
Alexandre Lision | 7f8351b | 2015-08-20 11:43:37 -0400 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #import "RingIDField.h" |
| 21 | |
| 22 | @interface RingIDField() { |
| 23 | NSSize m_previousIntrinsicContentSize; |
| 24 | } |
| 25 | |
| 26 | @end |
| 27 | |
| 28 | @implementation RingIDField |
| 29 | |
| 30 | - (void)drawRect:(NSRect)dirtyRect |
| 31 | { |
| 32 | [super drawRect:dirtyRect]; |
| 33 | |
| 34 | NSPoint origin = { 0.0,0.0 }; |
| 35 | NSRect rect; |
| 36 | rect.origin = origin; |
| 37 | rect.size.width = [self bounds].size.width; |
| 38 | rect.size.height = [self bounds].size.height; |
| 39 | |
| 40 | NSBezierPath * path; |
| 41 | path = [NSBezierPath bezierPathWithRect:rect]; |
| 42 | [path setLineWidth:3]; |
| 43 | [[NSColor colorWithCalibratedRed:0.337 green:0.69 blue:0.788 alpha:1.0] set]; |
| 44 | [path stroke]; |
| 45 | |
| 46 | } |
| 47 | |
| 48 | @end |