diff --git a/Telegram/Resources/icons/filters_type_archived.png b/Telegram/Resources/icons/filters/filters_type_archived.png similarity index 100% rename from Telegram/Resources/icons/filters_type_archived.png rename to Telegram/Resources/icons/filters/filters_type_archived.png diff --git a/Telegram/Resources/icons/filters_type_archived@2x.png b/Telegram/Resources/icons/filters/filters_type_archived@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_archived@2x.png rename to Telegram/Resources/icons/filters/filters_type_archived@2x.png diff --git a/Telegram/Resources/icons/filters_type_archived@3x.png b/Telegram/Resources/icons/filters/filters_type_archived@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_archived@3x.png rename to Telegram/Resources/icons/filters/filters_type_archived@3x.png diff --git a/Telegram/Resources/icons/filters_type_bots.png b/Telegram/Resources/icons/filters/filters_type_bots.png similarity index 100% rename from Telegram/Resources/icons/filters_type_bots.png rename to Telegram/Resources/icons/filters/filters_type_bots.png diff --git a/Telegram/Resources/icons/filters_type_bots@2x.png b/Telegram/Resources/icons/filters/filters_type_bots@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_bots@2x.png rename to Telegram/Resources/icons/filters/filters_type_bots@2x.png diff --git a/Telegram/Resources/icons/filters_type_bots@3x.png b/Telegram/Resources/icons/filters/filters_type_bots@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_bots@3x.png rename to Telegram/Resources/icons/filters/filters_type_bots@3x.png diff --git a/Telegram/Resources/icons/filters_type_channels.png b/Telegram/Resources/icons/filters/filters_type_channels.png similarity index 100% rename from Telegram/Resources/icons/filters_type_channels.png rename to Telegram/Resources/icons/filters/filters_type_channels.png diff --git a/Telegram/Resources/icons/filters_type_channels@2x.png b/Telegram/Resources/icons/filters/filters_type_channels@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_channels@2x.png rename to Telegram/Resources/icons/filters/filters_type_channels@2x.png diff --git a/Telegram/Resources/icons/filters_type_channels@3x.png b/Telegram/Resources/icons/filters/filters_type_channels@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_channels@3x.png rename to Telegram/Resources/icons/filters/filters_type_channels@3x.png diff --git a/Telegram/Resources/icons/filters_type_contacts.png b/Telegram/Resources/icons/filters/filters_type_contacts.png similarity index 100% rename from Telegram/Resources/icons/filters_type_contacts.png rename to Telegram/Resources/icons/filters/filters_type_contacts.png diff --git a/Telegram/Resources/icons/filters_type_contacts@2x.png b/Telegram/Resources/icons/filters/filters_type_contacts@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_contacts@2x.png rename to Telegram/Resources/icons/filters/filters_type_contacts@2x.png diff --git a/Telegram/Resources/icons/filters_type_contacts@3x.png b/Telegram/Resources/icons/filters/filters_type_contacts@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_contacts@3x.png rename to Telegram/Resources/icons/filters/filters_type_contacts@3x.png diff --git a/Telegram/Resources/icons/filters_type_groups.png b/Telegram/Resources/icons/filters/filters_type_groups.png similarity index 100% rename from Telegram/Resources/icons/filters_type_groups.png rename to Telegram/Resources/icons/filters/filters_type_groups.png diff --git a/Telegram/Resources/icons/filters_type_groups@2x.png b/Telegram/Resources/icons/filters/filters_type_groups@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_groups@2x.png rename to Telegram/Resources/icons/filters/filters_type_groups@2x.png diff --git a/Telegram/Resources/icons/filters_type_groups@3x.png b/Telegram/Resources/icons/filters/filters_type_groups@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_groups@3x.png rename to Telegram/Resources/icons/filters/filters_type_groups@3x.png diff --git a/Telegram/Resources/icons/filters_type_muted.png b/Telegram/Resources/icons/filters/filters_type_muted.png similarity index 100% rename from Telegram/Resources/icons/filters_type_muted.png rename to Telegram/Resources/icons/filters/filters_type_muted.png diff --git a/Telegram/Resources/icons/filters_type_muted@2x.png b/Telegram/Resources/icons/filters/filters_type_muted@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_muted@2x.png rename to Telegram/Resources/icons/filters/filters_type_muted@2x.png diff --git a/Telegram/Resources/icons/filters_type_muted@3x.png b/Telegram/Resources/icons/filters/filters_type_muted@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_muted@3x.png rename to Telegram/Resources/icons/filters/filters_type_muted@3x.png diff --git a/Telegram/Resources/icons/filters_type_noncontacts.png b/Telegram/Resources/icons/filters/filters_type_noncontacts.png similarity index 100% rename from Telegram/Resources/icons/filters_type_noncontacts.png rename to Telegram/Resources/icons/filters/filters_type_noncontacts.png diff --git a/Telegram/Resources/icons/filters_type_noncontacts@2x.png b/Telegram/Resources/icons/filters/filters_type_noncontacts@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_noncontacts@2x.png rename to Telegram/Resources/icons/filters/filters_type_noncontacts@2x.png diff --git a/Telegram/Resources/icons/filters_type_noncontacts@3x.png b/Telegram/Resources/icons/filters/filters_type_noncontacts@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_noncontacts@3x.png rename to Telegram/Resources/icons/filters/filters_type_noncontacts@3x.png diff --git a/Telegram/Resources/icons/filters_type_read.png b/Telegram/Resources/icons/filters/filters_type_read.png similarity index 100% rename from Telegram/Resources/icons/filters_type_read.png rename to Telegram/Resources/icons/filters/filters_type_read.png diff --git a/Telegram/Resources/icons/filters_type_read@2x.png b/Telegram/Resources/icons/filters/filters_type_read@2x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_read@2x.png rename to Telegram/Resources/icons/filters/filters_type_read@2x.png diff --git a/Telegram/Resources/icons/filters_type_read@3x.png b/Telegram/Resources/icons/filters/filters_type_read@3x.png similarity index 100% rename from Telegram/Resources/icons/filters_type_read@3x.png rename to Telegram/Resources/icons/filters/filters_type_read@3x.png diff --git a/Telegram/Resources/icons/info_media_delete.png b/Telegram/Resources/icons/info_media_delete.png index 0898e3791..5702d982e 100644 Binary files a/Telegram/Resources/icons/info_media_delete.png and b/Telegram/Resources/icons/info_media_delete.png differ diff --git a/Telegram/Resources/icons/info_media_delete@2x.png b/Telegram/Resources/icons/info_media_delete@2x.png index 3b3b3fc33..c33801c8f 100644 Binary files a/Telegram/Resources/icons/info_media_delete@2x.png and b/Telegram/Resources/icons/info_media_delete@2x.png differ diff --git a/Telegram/Resources/icons/info_media_delete@3x.png b/Telegram/Resources/icons/info_media_delete@3x.png index 425d12bdb..d4a97c6ae 100644 Binary files a/Telegram/Resources/icons/info_media_delete@3x.png and b/Telegram/Resources/icons/info_media_delete@3x.png differ diff --git a/Telegram/Resources/icons/info_media_forward.png b/Telegram/Resources/icons/info_media_forward.png index c1cff1fc5..8726f1802 100644 Binary files a/Telegram/Resources/icons/info_media_forward.png and b/Telegram/Resources/icons/info_media_forward.png differ diff --git a/Telegram/Resources/icons/info_media_forward@2x.png b/Telegram/Resources/icons/info_media_forward@2x.png index 8f879ebd0..a141387a5 100644 Binary files a/Telegram/Resources/icons/info_media_forward@2x.png and b/Telegram/Resources/icons/info_media_forward@2x.png differ diff --git a/Telegram/Resources/icons/info_media_forward@3x.png b/Telegram/Resources/icons/info_media_forward@3x.png index b623b6a86..89dbab915 100644 Binary files a/Telegram/Resources/icons/info_media_forward@3x.png and b/Telegram/Resources/icons/info_media_forward@3x.png differ diff --git a/Telegram/Resources/icons/stickers_remove.png b/Telegram/Resources/icons/stickers_remove.png deleted file mode 100644 index 8a98e3293..000000000 Binary files a/Telegram/Resources/icons/stickers_remove.png and /dev/null differ diff --git a/Telegram/Resources/icons/stickers_remove@2x.png b/Telegram/Resources/icons/stickers_remove@2x.png deleted file mode 100644 index d9f22acd2..000000000 Binary files a/Telegram/Resources/icons/stickers_remove@2x.png and /dev/null differ diff --git a/Telegram/Resources/icons/stickers_remove@3x.png b/Telegram/Resources/icons/stickers_remove@3x.png deleted file mode 100644 index ce5bd3a25..000000000 Binary files a/Telegram/Resources/icons/stickers_remove@3x.png and /dev/null differ diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index c21ae2aff..b691e5a60 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -41,8 +41,8 @@ stickersRemove: IconButton(defaultIconButton) { width: 40px; height: 40px; - icon: icon {{ "stickers_remove", menuIconFg }}; - iconOver: icon {{ "stickers_remove", menuIconFgOver }}; + icon: icon {{ "info_media_delete", menuIconFg }}; + iconOver: icon {{ "info_media_delete", menuIconFgOver }}; rippleAreaSize: 40px; rippleAreaPosition: point(0px, 0px); diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index 673fd5862..2d0b70a92 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -169,7 +169,7 @@ infoTopBarForward: IconButton(infoTopBarBack) { width: 46px; icon: icon {{ "info_media_forward", boxTitleCloseFg }}; iconOver: icon {{ "info_media_forward", boxTitleCloseFgOver }}; - iconPosition: point(6px, -1px); + iconPosition: point(10px, -1px); rippleAreaPosition: point(1px, 6px); } infoTopBarDelete: IconButton(infoTopBarForward) { @@ -245,7 +245,7 @@ infoLayerTopBarForward: IconButton(infoLayerTopBarBack) { width: 45px; icon: icon {{ "info_media_forward", boxTitleCloseFg }}; iconOver: icon {{ "info_media_forward", boxTitleCloseFgOver }}; - iconPosition: point(6px, -1px); + iconPosition: point(11px, -1px); rippleAreaPosition: point(1px, 6px); } infoLayerTopBarDelete: IconButton(infoLayerTopBarForward) { diff --git a/Telegram/SourceFiles/settings/settings.style b/Telegram/SourceFiles/settings/settings.style index fb45aaaf5..99b55bc5b 100644 --- a/Telegram/SourceFiles/settings/settings.style +++ b/Telegram/SourceFiles/settings/settings.style @@ -217,6 +217,9 @@ settingsAccentColorSize: 24px; settingsAccentColorSkip: 4px; settingsAccentColorLine: 3px; +settingsFilterIconSkip: 68px; +settingsFilterIconLeft: 17px; + dictionariesSectionButton: SettingsButton(settingsUpdateToggle) { font: font(14px semibold); } diff --git a/Telegram/SourceFiles/settings/settings_folders.cpp b/Telegram/SourceFiles/settings/settings_folders.cpp index 66e001378..a45467266 100644 --- a/Telegram/SourceFiles/settings/settings_folders.cpp +++ b/Telegram/SourceFiles/settings/settings_folders.cpp @@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/text/text_utilities.h" #include "ui/wrap/slide_wrap.h" #include "ui/painter.h" +#include "ui/filter_icons.h" #include "settings/settings_common.h" #include "lang/lang_keys.h" #include "apiwrap.h" @@ -88,6 +89,7 @@ private: Ui::Text::String _title; QString _status; + Ui::FilterIcon _icon = Ui::FilterIcon(); State _state = State::Normal; @@ -192,6 +194,7 @@ void FilterRowButton::updateData(const Data::ChatFilter &filter) { _title.setText(st::contactsNameStyle, filter.title()); _status = ComputeCountString(_session, filter, true); + _icon = Ui::ComputeFilterIcon(filter); update(); } @@ -213,6 +216,7 @@ void FilterRowButton::setup( _title.setText(st::contactsNameStyle, filter.title()); _status = status; + _icon = Ui::ComputeFilterIcon(filter); setState(_state, true); @@ -250,8 +254,9 @@ rpl::producer<> FilterRowButton::addRequests() const { void FilterRowButton::paintEvent(QPaintEvent *e) { auto p = Painter(this); + const auto over = isOver() || isDown(); if (_state == State::Normal) { - if (isOver() || isDown()) { + if (over) { p.fillRect(e->rect(), st::windowBgOver); } RippleButton::paintRipple(p, 0, 0); @@ -259,7 +264,9 @@ void FilterRowButton::paintEvent(QPaintEvent *e) { p.setOpacity(st::stickersRowDisabledOpacity); } - const auto left = st::settingsSubsectionTitlePadding.left(); + const auto left = (_state == State::Suggested) + ? st::settingsSubsectionTitlePadding.left() + : st::settingsFilterIconSkip; const auto buttonsLeft = std::min( _add.x(), std::min(_remove.x(), _restore.x())); @@ -280,6 +287,16 @@ void FilterRowButton::paintEvent(QPaintEvent *e) { st::contactsPadding.top() + st::contactsStatusTop, width(), _status); + + if (_state != State::Suggested) { + const auto icon = Ui::LookupFilterIcon(_icon).normal; + icon->paint( + p, + st::settingsFilterIconLeft, + (height() - icon->height()) / 2, + width(), + (over ? st::menuIconFgOver : st::menuIconFg)->c); + } } [[nodiscard]] Fn SetupFoldersContent( diff --git a/Telegram/SourceFiles/window/window.style b/Telegram/SourceFiles/window/window.style index 75b0e2fc1..748a215f2 100644 --- a/Telegram/SourceFiles/window/window.style +++ b/Telegram/SourceFiles/window/window.style @@ -293,14 +293,14 @@ windwoFilterIconPanelPosition: point(-2px, -1px); windowFilterIconSingle: size(44px, 42px); windowFilterIconPadding: margins(10px, 36px, 10px, 8px); windowFilterIconHeaderPosition: point(18px, 14px); -windowFilterTypeContacts: icon {{ "filters_type_contacts", historyPeerUserpicFg }}; -windowFilterTypeNonContacts: icon {{ "filters_type_noncontacts", historyPeerUserpicFg }}; -windowFilterTypeGroups: icon {{ "filters_type_groups", historyPeerUserpicFg }}; -windowFilterTypeChannels: icon {{ "filters_type_channels", historyPeerUserpicFg }}; -windowFilterTypeBots: icon {{ "filters_type_bots", historyPeerUserpicFg }}; -windowFilterTypeNoMuted: icon {{ "filters_type_muted", historyPeerUserpicFg }}; -windowFilterTypeNoArchived: icon {{ "filters_type_archived", historyPeerUserpicFg }}; -windowFilterTypeNoRead: icon {{ "filters_type_read", historyPeerUserpicFg }}; +windowFilterTypeContacts: icon {{ "filters/filters_type_contacts", historyPeerUserpicFg }}; +windowFilterTypeNonContacts: icon {{ "filters/filters_type_noncontacts", historyPeerUserpicFg }}; +windowFilterTypeGroups: icon {{ "filters/filters_type_groups", historyPeerUserpicFg }}; +windowFilterTypeChannels: icon {{ "filters/filters_type_channels", historyPeerUserpicFg }}; +windowFilterTypeBots: icon {{ "filters/filters_type_bots", historyPeerUserpicFg }}; +windowFilterTypeNoMuted: icon {{ "filters/filters_type_muted", historyPeerUserpicFg }}; +windowFilterTypeNoArchived: icon {{ "filters/filters_type_archived", historyPeerUserpicFg }}; +windowFilterTypeNoRead: icon {{ "filters/filters_type_read", historyPeerUserpicFg }}; windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) { style: TextStyle(defaultTextStyle) { font: searchedBarFont;