From 1fdd591aa0f8ed12dd4d6121a2d1be54dedc5168 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 Apr 2020 10:42:00 +0400 Subject: [PATCH] Change manage folders button icon. --- .../Resources/icons/filters/filters_edit.png | Bin 0 -> 339 bytes .../Resources/icons/filters/filters_edit@2x.png | Bin 0 -> 686 bytes .../Resources/icons/filters/filters_edit@3x.png | Bin 0 -> 1132 bytes Telegram/SourceFiles/ui/filter_icons.cpp | 8 ++++++++ Telegram/SourceFiles/ui/filter_icons.h | 2 ++ Telegram/SourceFiles/ui/filter_icons.style | 2 ++ .../SourceFiles/window/window_filters_menu.cpp | 2 +- 7 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Telegram/Resources/icons/filters/filters_edit.png create mode 100644 Telegram/Resources/icons/filters/filters_edit@2x.png create mode 100644 Telegram/Resources/icons/filters/filters_edit@3x.png diff --git a/Telegram/Resources/icons/filters/filters_edit.png b/Telegram/Resources/icons/filters/filters_edit.png new file mode 100644 index 0000000000000000000000000000000000000000..853d5f598ede7e9c8e2ba08553949051f6fdd448 GIT binary patch literal 339 zcmV-Z0j&OsP)(;u4$fU8pn~W zwQx)Rb==;{vUJllxxMi_&x7;s2g3*UeIKwa%i`L$bv&|lU3U%8FbrWMX;)QM0Kg;L zx~_+Svdc0S*db!6KiQQ@0ZBz&YzO+`ev_nqQb3XrVPTX+DFL!y6BV^o2Y&PDo+o_q z#TPOq4InOJZ2!eAObR+KvWTHa3!{%=FO}$X6m@o2_J*io9eO(LA)x3*CvrS0>N7DY lAjFa~qzoYjkUu*O{Q&BFchYttbU6S3002ovPDHLkV1f-sg^vIL literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters/filters_edit@2x.png b/Telegram/Resources/icons/filters/filters_edit@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..2236b91f6d6e1e4385d369282aeddd4ce56f85a6 GIT binary patch literal 686 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!Ea{HEjtmSN`?>!lvNA9*rFyzJ zhEy=Vo$0%-$v~v_1rJf`bbelZrzN1E;qmlMBa$4I-p))YmTfSu^i#+3uYE z_tU@sw$)#8xcx>zTfONd?bA;$#psD&PU~2Bmf`y}wK>;cUp=<$%i^;P6D~2O#LxA6 zI;G^Es0L>()08P<3fB8;3@U8o(stjSbu?+B_?3sNrGELaWo(U_`TA>=tp63Oh8^bo z@mKqfC$H_jz5KC-k7Mv5Mi!0Zdo6#g`c`9?oqNYF_qeD2=Wom0wkJ5uKC8C-Zr)=4 zEpM4#f88ZkRQvq%&TGs14@cL1Q@Z$D&D`^N+mh6O+@VRIm-i|$F7@YS;#hAMXMV=B z{qVsX{a5z@@g4CU)q2mb-K^%@XunB~>EP*_%bxWo)g7K>as}`>lsWZGx~cr#C~C)? zjc-M(t}E+p-+TO7u|03?FK10Zp~}P4#1?RF`;*By>%n3}U5DkDSI(Mz>hip!tHb~7 znz^^1Pg!1JVtY=y;k1VM{gxb&yH?dszPWl^e<1r327}7@x6L{S^**ybNqc!mM^5k7 zlh;ybCK#qzPJAnKXiv%t&sjNATh9nPgzfryf0v+fb)4663uf;doL^RcJSu$PwOLu3 zegNw|tsu9HlinM>Pu=%=$$k-Gg-<4|9t|9fLerX9Is_CFHHqRptQSn;v9eh7o(Gr! O89ZJ6T-G@yGywq1T`3&^ literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters/filters_edit@3x.png b/Telegram/Resources/icons/filters/filters_edit@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..28fd6076aade28a1b33dcd089cbee335651e0c28 GIT binary patch literal 1132 zcmeAS@N?(olHy`uVBq!ia0vp^IUvlz1|<8_!p{OJmUKs7M+SzC{oH>NS%F+-PZ!6K z3dXmy4fC`NMO=A*PEcZXm0GaCY0(nj$*xPzF>RWvqoBROt>lYGP9vLUD3?<+i|drG zGvA#JA2qWxJ%0Y^q+Sp(4)f*o-s(Ha1!WuwC?=d7n=};zodi0TXjE zgO8qZ&w&Fn43kguC>t2CA9!MPn1kmGqruKI)Rg|s?(=^AiM=~_8h-!&ec9ElnYV98 zZ;sG8bNlve$^PTd9zRyzrS|i`!M{qI7iGI|CK#Nsv$r>npZvEd#!mdA^PyYjyMtDy z=yncOp|K)@GzEDS-PFtKX*G+DN2-kkl?{trzXErY$6 zUV0|>{zUI3M+yx^x3N6)sjaFy^|;_#UFYMZwtLg|G2c4-|89!fk6*vCUVYtl zz2j=u)|sMy%Y!e!EHT@BENbnuzi(>n%-@zp=d!Idlgi0YNV2!HdzN;wz~YR~iTYnk z?^EmJCRcd7ZSYHiy2^XG5on4Nwded)LQWY4nN+P9|h-%c0CzyALFUNMuy6;`zk z6K)?qd^qs&(;e$?&VIf4c`TRTU-L6*(=tt@!sOGk&1OIQ``0#n&llfcJMO=+owIY- zu3PtGf7puGb4N>b8BckkY19NF{u^wUo-DqZH%<{-oZ}oW@ZwO=JHf^;u^Wf;A5*ZV=uOWW8pe$<(O!i(dsKBpjI_X~a$c zs$b?Y)?-=P=BF-&bbU9u)~Hd-|HpRMqVut)9Wmd05_T`OYxhbxFw3f+Ndd8{z8GEN2J^l31=;_kb^Ve89)Ku?Yaz9)4V%4+lhGmKD zAq`KbYCfN8x;t);)jPZCugtM}ZRDi_?gQu&X%Q~lo FCIIdY2zdYi literal 0 HcmV?d00001 diff --git a/Telegram/SourceFiles/ui/filter_icons.cpp b/Telegram/SourceFiles/ui/filter_icons.cpp index 7ac99bc9a..83d84f943 100644 --- a/Telegram/SourceFiles/ui/filter_icons.cpp +++ b/Telegram/SourceFiles/ui/filter_icons.cpp @@ -130,6 +130,11 @@ const auto kIcons = std::vector{ &st::foldersWorkActive, "\xF0\x9F\x92\xBC"_cs.utf16() }, + { + &st::filtersEdit, + &st::filtersEdit, + QString() + } }; } // namespace @@ -145,6 +150,9 @@ std::optional LookupFilterIconByEmoji(const QString &emoji) { auto result = base::flat_map(); auto index = 0; for (const auto &entry : kIcons) { + if (entry.emoji.isEmpty()) { + continue; + } const auto emoji = Ui::Emoji::Find(entry.emoji); Assert(emoji != nullptr); result.emplace(emoji, static_cast(index++)); diff --git a/Telegram/SourceFiles/ui/filter_icons.h b/Telegram/SourceFiles/ui/filter_icons.h index fadde3f29..8c3aa09eb 100644 --- a/Telegram/SourceFiles/ui/filter_icons.h +++ b/Telegram/SourceFiles/ui/filter_icons.h @@ -44,6 +44,8 @@ enum class FilterIcon : uchar { Trade, Travel, Work, + + Edit, }; struct FilterIcons { diff --git a/Telegram/SourceFiles/ui/filter_icons.style b/Telegram/SourceFiles/ui/filter_icons.style index 288bd1b36..92227a0df 100644 --- a/Telegram/SourceFiles/ui/filter_icons.style +++ b/Telegram/SourceFiles/ui/filter_icons.style @@ -26,6 +26,8 @@ filtersCustomActive: icon {{ "filters/filters_custom_active", sideBarIconFgActiv filtersSetup: icon {{ "filters/filters_setup", sideBarIconFg }}; filtersSetupActive: icon {{ "filters/filters_setup", sideBarIconFgActive }}; +filtersEdit: icon {{ "filters/filters_edit", sideBarIconFg }}; + foldersCat: icon {{ "filters/folders_cat", sideBarIconFg }}; foldersCatActive: icon {{ "filters/folders_cat_active", sideBarIconFgActive }}; foldersCrown: icon {{ "filters/folders_crown", sideBarIconFg }}; diff --git a/Telegram/SourceFiles/window/window_filters_menu.cpp b/Telegram/SourceFiles/window/window_filters_menu.cpp index cca1a88ac..693224441 100644 --- a/Telegram/SourceFiles/window/window_filters_menu.cpp +++ b/Telegram/SourceFiles/window/window_filters_menu.cpp @@ -198,7 +198,7 @@ void FiltersMenu::setupList() { _container, -1, tr::lng_filters_setup(tr::now), - Ui::FilterIcon::Setup); + Ui::FilterIcon::Edit); _reorder = std::make_unique(_list, &_scroll); _reorder->updates(