summaryrefslogtreecommitdiffstats
path: root/macosx/HBPicture+UIAdditions.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-05-24 10:51:26 +0200
committerDamiano Galassi <[email protected]>2016-05-24 10:51:26 +0200
commitb015c304d1d72ae7e43e0eae25048136069f03ad (patch)
tree4a1c2fd312f2ffeae8b71c4ed8b63877ee910fd5 /macosx/HBPicture+UIAdditions.m
parentc0393485103ded582169ce383f411450ab8e016d (diff)
MacGui: split HBPicture KVO dependencies.
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:@""];