CPDFListViewConfig.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // CPDFListViewConfig.m
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import "CPDFListViewConfig.h"
  13. @implementation CPDFListViewConfig
  14. + (instancetype)defaultManager {
  15. static CPDFListViewConfig *singleton = nil;
  16. static dispatch_once_t pred;
  17. dispatch_once(&pred, ^{
  18. singleton = [[CPDFListViewConfig alloc] init];
  19. });
  20. return singleton;
  21. }
  22. - (NSNumber *)annotationBorderOffset {
  23. if(_annotationBorderOffset) {
  24. return _annotationBorderOffset;
  25. }
  26. return @(5);
  27. }
  28. - (NSColor *)annotationBorderColor {
  29. if(_annotationBorderColor) {
  30. return _annotationBorderColor;
  31. }
  32. return [NSColor colorWithRed:82.0/255.0 green:102.0/255.0 blue:204.0/255.0 alpha:1];
  33. }
  34. - (NSColor *)dragHoverColor {
  35. if(_dragHoverColor) {
  36. return _dragHoverColor;
  37. }
  38. return [NSColor colorWithRed:23/255.0 green:112/255.0 blue:244/255.0 alpha:1.0];
  39. }
  40. @end