diff --git a/LegacyComponents/TGCheckButtonView.h b/LegacyComponents/TGCheckButtonView.h index 56c97c391b..d0bdc0db95 100644 --- a/LegacyComponents/TGCheckButtonView.h +++ b/LegacyComponents/TGCheckButtonView.h @@ -7,12 +7,13 @@ typedef enum TGCheckButtonStyleBar, TGCheckButtonStyleMedia, TGCheckButtonStyleGallery, - TGCheckButtonStyleShare + TGCheckButtonStyleShare, + TGCheckButtonStyleChat } TGCheckButtonStyle; @interface TGCheckButtonPallete : NSObject -@property (nonatomic, readonly) UIImage *defaultBackgroundColor; +@property (nonatomic, readonly) UIColor *defaultBackgroundColor; @property (nonatomic, readonly) UIColor *accentBackgroundColor; @property (nonatomic, readonly) UIColor *defaultBorderColor; @property (nonatomic, readonly) UIColor *mediaBorderColor; diff --git a/LegacyComponents/TGCheckButtonView.m b/LegacyComponents/TGCheckButtonView.m index 01b9fc0f19..fd784d3e50 100644 --- a/LegacyComponents/TGCheckButtonView.m +++ b/LegacyComponents/TGCheckButtonView.m @@ -96,6 +96,7 @@ static CGAffineTransform TGCheckButtonDefaultTransform; break; case TGCheckButtonStyleMedia: + case TGCheckButtonStyleChat: { insideInset = 4.0f; borderOnTop = true; @@ -147,6 +148,7 @@ static CGAffineTransform TGCheckButtonDefaultTransform; break; case TGCheckButtonStyleMedia: + case TGCheckButtonStyleChat: { CGRect rect = CGRectMake(0, 0, size.width, size.height); UIGraphicsBeginImageContextWithOptions(rect.size, false, 0); @@ -210,6 +212,7 @@ static CGAffineTransform TGCheckButtonDefaultTransform; switch (style) { case TGCheckButtonStyleShare: + case TGCheckButtonStyleChat: { CGRect rect = CGRectMake(0, 0, size.width, size.height); UIGraphicsBeginImageContextWithOptions(rect.size, false, 0); diff --git a/LegacyComponents/TGImageBlur.m b/LegacyComponents/TGImageBlur.m index 0f410c084c..00889903fd 100644 --- a/LegacyComponents/TGImageBlur.m +++ b/LegacyComponents/TGImageBlur.m @@ -2361,6 +2361,8 @@ NSArray *TGBlurredBackgroundImages(UIImage *source, CGSize sourceSize) fastBlurMore(targetContextSize.width, targetContextSize.height, (int)targetBytesPerRow, targetMemory); brightenImage(targetMemory, targetContextSize.width, targetContextSize.height, (int)targetBytesPerRow); + CGContextSetFillColorWithColor(targetContext, [UIColor colorWithWhite:1.0f alpha:0.15f].CGColor); + CGContextFillRect(targetContext, CGRectMake(0.0f, 0.0f, targetContextSize.width, targetContextSize.height)); CGImageRef bitmapImage = CGBitmapContextCreateImage(targetContext); UIImage *foregroundImage = [[UIImage alloc] initWithCGImage:bitmapImage]; CGImageRelease(bitmapImage);