summaryrefslogtreecommitdiffstats
path: root/macosx/HBPicture+UIAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBPicture+UIAdditions.m')
-rw-r--r--macosx/HBPicture+UIAdditions.m32
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:@""];