Add icons to report reason selectors.
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/copyright.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 611 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/copyright@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/copyright@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/drugs.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 556 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/drugs@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/drugs@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/fake.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 726 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/fake@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/fake@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/personal.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 599 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/personal@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/personal@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/porn.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 632 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/porn@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/porn@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/violence.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 695 B  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/violence@2x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Telegram/Resources/icons/menu/violence@3x.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
						 | 
				
			
			@ -954,3 +954,9 @@ shortInfoCover: ShortInfoCover {
 | 
			
		|||
		thickness: 2px;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
reportReasonTopSkip: 8px;
 | 
			
		||||
reportReasonButton: SettingsButton(infoProfileButton) {
 | 
			
		||||
	style: boxTextStyle;
 | 
			
		||||
	padding: margins(62px, 7px, 8px, 7px);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,12 +9,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
 | 
			
		|||
 | 
			
		||||
#include "lang/lang_keys.h"
 | 
			
		||||
#include "ui/layers/generic_box.h"
 | 
			
		||||
#include "ui/wrap/vertical_layout.h"
 | 
			
		||||
#include "ui/widgets/buttons.h"
 | 
			
		||||
#include "ui/widgets/input_fields.h"
 | 
			
		||||
#include "ui/toast/toast.h"
 | 
			
		||||
#include "info/profile/info_profile_icon.h"
 | 
			
		||||
#include "styles/style_layers.h"
 | 
			
		||||
#include "styles/style_boxes.h"
 | 
			
		||||
#include "styles/style_profile.h"
 | 
			
		||||
#include "styles/style_info.h"
 | 
			
		||||
#include "Styles/style_menu_icons.h"
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
namespace {
 | 
			
		||||
| 
						 | 
				
			
			@ -39,27 +43,62 @@ void ReportReasonBox(
 | 
			
		|||
		}
 | 
			
		||||
		Unexpected("'source' in ReportReasonBox.");
 | 
			
		||||
	}());
 | 
			
		||||
	const auto add = [&](Reason reason, tr::phrase<> text) {
 | 
			
		||||
	auto margin = style::margins{ 0, st::reportReasonTopSkip, 0, 0 };
 | 
			
		||||
	const auto add = [&](
 | 
			
		||||
			Reason reason,
 | 
			
		||||
			tr::phrase<> text,
 | 
			
		||||
			const style::icon &icon) {
 | 
			
		||||
		const auto &st = st::reportReasonButton;
 | 
			
		||||
		const auto layout = box->verticalLayout();
 | 
			
		||||
		const auto button = layout->add(
 | 
			
		||||
			object_ptr<SettingsButton>(layout, text()));
 | 
			
		||||
			object_ptr<Ui::SettingsButton>(layout.get(), text(), st),
 | 
			
		||||
			margin);
 | 
			
		||||
		margin = {};
 | 
			
		||||
		button->setClickedCallback([=] {
 | 
			
		||||
			done(reason);
 | 
			
		||||
		});
 | 
			
		||||
		const auto height = st.padding.top()
 | 
			
		||||
			+ st.height
 | 
			
		||||
			+ st.padding.bottom();
 | 
			
		||||
		object_ptr<Info::Profile::FloatingIcon>(
 | 
			
		||||
			button,
 | 
			
		||||
			icon,
 | 
			
		||||
			QPoint{
 | 
			
		||||
				st::infoSharedMediaButtonIconPosition.x(),
 | 
			
		||||
				(height - icon.height()) / 2,
 | 
			
		||||
			});
 | 
			
		||||
	};
 | 
			
		||||
	add(Reason::Spam, tr::lng_report_reason_spam);
 | 
			
		||||
	add(Reason::Spam, tr::lng_report_reason_spam, st::menuIconDelete);
 | 
			
		||||
	if (source != Source::Message) {
 | 
			
		||||
		add(Reason::Fake, tr::lng_report_reason_fake);
 | 
			
		||||
		add(Reason::Fake, tr::lng_report_reason_fake, st::menuIconFake);
 | 
			
		||||
	}
 | 
			
		||||
	add(Reason::Violence, tr::lng_report_reason_violence);
 | 
			
		||||
	add(Reason::ChildAbuse, tr::lng_report_reason_child_abuse);
 | 
			
		||||
	add(Reason::Pornography, tr::lng_report_reason_pornography);
 | 
			
		||||
	add(Reason::Copyright, tr::lng_report_reason_copyright);
 | 
			
		||||
	add(
 | 
			
		||||
		Reason::Violence,
 | 
			
		||||
		tr::lng_report_reason_violence,
 | 
			
		||||
		st::menuIconViolence);
 | 
			
		||||
	add(
 | 
			
		||||
		Reason::ChildAbuse,
 | 
			
		||||
		tr::lng_report_reason_child_abuse,
 | 
			
		||||
		st::menuIconBlock);
 | 
			
		||||
	add(
 | 
			
		||||
		Reason::Pornography,
 | 
			
		||||
		tr::lng_report_reason_pornography,
 | 
			
		||||
		st::menuIconPorn);
 | 
			
		||||
	add(
 | 
			
		||||
		Reason::Copyright,
 | 
			
		||||
		tr::lng_report_reason_copyright,
 | 
			
		||||
		st::menuIconCopyright);
 | 
			
		||||
	if (source == Source::Message) {
 | 
			
		||||
		add(Reason::IllegalDrugs, tr::lng_report_reason_illegal_drugs);
 | 
			
		||||
		add(Reason::PersonalDetails, tr::lng_report_reason_personal_details);
 | 
			
		||||
		add(
 | 
			
		||||
			Reason::IllegalDrugs,
 | 
			
		||||
			tr::lng_report_reason_illegal_drugs,
 | 
			
		||||
			st::menuIconDrugs);
 | 
			
		||||
		add(
 | 
			
		||||
			Reason::PersonalDetails,
 | 
			
		||||
			tr::lng_report_reason_personal_details,
 | 
			
		||||
			st::menuIconPersonal);
 | 
			
		||||
	}
 | 
			
		||||
	add(Reason::Other, tr::lng_report_reason_other);
 | 
			
		||||
	add(Reason::Other, tr::lng_report_reason_other, st::menuIconReport);
 | 
			
		||||
 | 
			
		||||
	box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,6 +87,12 @@ menuIconImportTheme: icon {{ "menu/import_theme", menuIconColor }};
 | 
			
		|||
menuIconExportTheme: icon {{ "menu/export_theme", menuIconColor }};
 | 
			
		||||
menuIconRestore: icon {{ "menu/restore", menuIconColor }};
 | 
			
		||||
menuIconSettings: icon {{ "menu/settings", menuIconColor }};
 | 
			
		||||
menuIconCopyright: icon {{ "menu/copyright", menuIconColor }};
 | 
			
		||||
menuIconDrugs: icon {{ "menu/drugs", menuIconColor }};
 | 
			
		||||
menuIconFake: icon {{ "menu/fake", menuIconColor }};
 | 
			
		||||
menuIconPersonal: icon {{ "menu/personal", menuIconColor }};
 | 
			
		||||
menuIconPorn: icon {{ "menu/porn", menuIconColor }};
 | 
			
		||||
menuIconViolence: icon {{ "menu/violence", menuIconColor }};
 | 
			
		||||
 | 
			
		||||
mediaMenuIconStickers: icon {{ "menu/stickers", mediaviewMenuFg }};
 | 
			
		||||
mediaMenuIconCancel: icon {{ "menu/cancel", mediaviewMenuFg }};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||