diff options
author | Damiano Galassi <[email protected]> | 2016-05-24 10:51:26 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-05-24 10:51:26 +0200 |
commit | b015c304d1d72ae7e43e0eae25048136069f03ad (patch) | |
tree | 4a1c2fd312f2ffeae8b71c4ed8b63877ee910fd5 /macosx/HBPicture+UIAdditions.m | |
parent | c0393485103ded582169ce383f411450ab8e016d (diff) |
MacGui: split HBPicture KVO dependencies.
Diffstat (limited to 'macosx/HBPicture+UIAdditions.m')
-rw-r--r-- | macosx/HBPicture+UIAdditions.m | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/macosx/HBPicture+UIAdditions.m b/macosx/HBPicture+UIAdditions.m index 87759ad74..81da8c986 100644 --- a/macosx/HBPicture+UIAdditions.m +++ b/macosx/HBPicture+UIAdditions.m @@ -16,20 +16,33 @@ @dynamic maxHorizontalCrop; @dynamic maxVerticalCrop; -@dynamic keepDisplayAspectEditable; - #pragma mark - Editable state ++ (NSSet<NSString *> *)keyPathsForValuesAffectingWidthEditable +{ + return [NSSet setWithObjects:@"anamorphicMode", nil]; +} + - (BOOL)isWidthEditable { return (self.anamorphicMode != HB_ANAMORPHIC_STRICT) ? YES : NO; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingHeightEditable +{ + return [NSSet setWithObjects:@"anamorphicMode", nil]; +} + - (BOOL)isHeightEditable { return (self.anamorphicMode != HB_ANAMORPHIC_STRICT) ? YES : NO; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingKeepDisplayAspectEditable +{ + return [NSSet setWithObjects:@"anamorphicMode", nil]; +} + - (BOOL)isKeepDisplayAspectEditable { if (self.anamorphicMode == HB_ANAMORPHIC_STRICT || @@ -43,11 +56,21 @@ } } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCustomAnamorphicEnabled +{ + return [NSSet setWithObjects:@"anamorphicMode", nil]; +} + - (BOOL)isCustomAnamorphicEnabled { return self.anamorphicMode == HB_ANAMORPHIC_CUSTOM; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingInfo +{ + return [NSSet setWithObjects:@"parWidth", @"parHeight", @"displayWidth", @"width", @"height",@"anamorphicMode", @"cropTop", @"cropBottom", @"cropLeft", @"cropRight", nil]; +} + - (NSString *)info { NSString *sizeInfo = @""; @@ -98,6 +121,11 @@ return sizeInfo; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingSummary +{ + return [NSSet setWithObjects:@"parWidth", @"parHeight", @"displayWidth", @"width", @"height",@"anamorphicMode", @"cropTop", @"cropBottom", @"cropLeft", @"cropRight", nil]; +} + - (NSString *)summary { NSMutableString *summary = [NSMutableString stringWithString:@""]; |