From cef24a15f23364711afe934037f62f4d8f3fced2 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 2 Oct 2020 09:34:50 +1000 Subject: [PATCH] Fix icon --- .../Loki V2/Mute.imageset/Contents.json | 12 ++ .../Loki V2/Mute.imageset/Mute.pdf | 169 ++++++++++++++++++ .../OWSConversationSettingsViewController.m | 31 ++-- 3 files changed, 193 insertions(+), 19 deletions(-) create mode 100644 Signal/Images.xcassets/Loki V2/Mute.imageset/Contents.json create mode 100644 Signal/Images.xcassets/Loki V2/Mute.imageset/Mute.pdf diff --git a/Signal/Images.xcassets/Loki V2/Mute.imageset/Contents.json b/Signal/Images.xcassets/Loki V2/Mute.imageset/Contents.json new file mode 100644 index 000000000..1c49e26bd --- /dev/null +++ b/Signal/Images.xcassets/Loki V2/Mute.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Mute.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Signal/Images.xcassets/Loki V2/Mute.imageset/Mute.pdf b/Signal/Images.xcassets/Loki V2/Mute.imageset/Mute.pdf new file mode 100644 index 000000000..2195e6a36 --- /dev/null +++ b/Signal/Images.xcassets/Loki V2/Mute.imageset/Mute.pdf @@ -0,0 +1,169 @@ +%PDF-1.7 + +1 0 obj + << /BBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources << >> + /Subtype /Form + /Length 2 0 R + /Group << /Type /Group + /S /Transparency + >> + /Type /XObject + >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 9.873764 8.711097 cm +0.000000 0.000000 0.000000 scn +8.981352 14.427887 m +8.981352 14.753547 8.792812 15.062067 8.501433 15.199186 c +8.192913 15.353447 7.850114 15.302027 7.593014 15.096347 c +0.000000 9.045927 l +8.981352 0.064566 l +8.981352 14.427887 l +8.981352 14.427887 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 0.002411 -0.083572 cm +0.000000 0.000000 0.000000 scn +23.744467 1.547312 m +1.462470 23.829311 l +1.128240 24.163542 0.584902 24.163542 0.250672 23.829311 c +-0.083557 23.495083 -0.083557 22.951744 0.250672 22.617514 c +5.642916 17.223557 l +5.140714 17.223557 l +4.609374 17.223557 4.146594 16.983597 3.838074 16.606518 c +3.580974 16.315136 3.426714 15.920917 3.426714 15.509557 c +3.426714 8.653556 l +3.426714 7.710855 4.198014 6.939556 5.140714 6.939556 c +9.117193 6.939556 l +17.464373 0.272099 l +17.618631 0.152117 17.807171 0.083557 17.995710 0.083557 c +18.115690 0.083557 18.252811 0.117836 18.372791 0.169256 c +18.664171 0.306377 18.852711 0.614897 18.852711 0.940557 c +18.852711 4.013760 l +22.530954 0.335516 l +22.698927 0.167543 22.918318 0.083557 23.137711 0.083557 c +23.357101 0.083557 23.576494 0.167542 23.744467 0.333801 c +24.078695 0.669744 24.078695 1.211369 23.744467 1.547312 c +h +f +n +Q + +endstream +endobj + +2 0 obj + 1283 +endobj + +3 0 obj + << /BBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources << >> + /Subtype /Form + /Length 4 0 R + /Group << /Type /Group + /S /Transparency + >> + /Type /XObject + >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm +0.000000 0.000000 0.000000 scn +0.000000 24.000000 m +24.000000 24.000000 l +24.000000 0.000000 l +0.000000 0.000000 l +0.000000 24.000000 l +h +f +n +Q + +endstream +endobj + +4 0 obj + 232 +endobj + +5 0 obj + << /XObject << /X1 1 0 R >> + /ExtGState << /E1 << /SMask << /Type /Mask + /G 3 0 R + /S /Alpha + >> + /Type /ExtGState + >> >> + >> +endobj + +6 0 obj + << /Length 7 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +/E1 gs +/X1 Do +Q + +endstream +endobj + +7 0 obj + 46 +endobj + +8 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 5 0 R + /Contents 6 0 R + /Parent 9 0 R + >> +endobj + +9 0 obj + << /Kids [ 8 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +10 0 obj + << /Type /Catalog + /Pages 9 0 R + >> +endobj + +xref +0 11 +0000000000 65535 f +0000000010 00000 n +0000001541 00000 n +0000001564 00000 n +0000002044 00000 n +0000002066 00000 n +0000002364 00000 n +0000002466 00000 n +0000002487 00000 n +0000002660 00000 n +0000002734 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 10 0 R + /Size 11 +>> +startxref +2794 +%%EOF \ No newline at end of file diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m index 68335302c..df26facd6 100644 --- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m @@ -769,7 +769,7 @@ const CGFloat kIconViewLength = 24; cell.preservesSuperviewLayoutMargins = YES; cell.contentView.preservesSuperviewLayoutMargins = YES; - UIImageView *iconView = [strongSelf viewForIconWithName:@"table_ic_mute_thread"]; + UIImageView *iconView = [strongSelf viewForIconWithName:@"Mute"]; UILabel *rowLabel = [UILabel new]; rowLabel.text = NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_LABEL", @@ -832,24 +832,17 @@ const CGFloat kIconViewLength = 24; // Block Conversation section. if (!isNoteToSelf && [self.thread isKindOfClass:TSContactThread.class]) { - [mainSection addItem: - [OWSTableItem itemWithCustomCellBlock:^{ - NSString *title = @"Reset Secure Session"; - UIView *iconViewContainer = [UIView new]; - UIImageView *iconView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"system_message_security"] asTintedImageWithColor:LKColors.text]]; - [iconViewContainer addSubview:iconView]; - [iconViewContainer autoSetDimension:ALDimensionWidth toSize:kIconViewLength]; - [iconViewContainer autoSetDimension:ALDimensionHeight toSize:kIconViewLength]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeLeading]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:1]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeTrailing withInset:2]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:1]; - [iconView autoSetDimension:ALDimensionWidth toSize:kIconViewLength - 2]; - [iconView autoSetDimension:ALDimensionHeight toSize:kIconViewLength - 2]; - return [weakSelf cellWithName:title iconView:iconViewContainer]; - } - actionBlock:^{ [weakSelf resetSecureSession]; }] - ]; + [mainSection addItem:[OWSTableItem + itemWithCustomCellBlock:^{ + return [weakSelf + disclosureCellWithName:@"Reset Secure Session" + iconName:@"system_message_security" + accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME( + OWSConversationSettingsViewController, @"reset_secure_ession")]; + } + actionBlock:^{ + [weakSelf resetSecureSession]; + }]]; mainSection.footerTitle = NSLocalizedString( @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user.");