2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-23 14:48:19 +00:00

Add icons to the media viewer menus.

This commit is contained in:
John Preston
2021-12-10 16:10:14 +04:00
parent 2c36623cfb
commit b773bb6e70
220 changed files with 121 additions and 51 deletions

View File

@@ -113,7 +113,9 @@ void ShowCallsBox(not_null<Window::SessionController*> window) {
const auto menu = std::make_shared<MenuPointer>();
const auto menuButton = box->addTopButton(st::infoTopBarMenu);
menuButton->setClickedCallback([=] {
*menu = base::make_unique_q<Ui::PopupMenu>(menuButton);
*menu = base::make_unique_q<Ui::PopupMenu>(
menuButton,
st::popupMenuWithIcons);
const auto showSettings = [=] {
window->showSettings(
Settings::Type::Calls,
@@ -124,11 +126,13 @@ void ShowCallsBox(not_null<Window::SessionController*> window) {
});
(*menu)->addAction(
tr::lng_settings_section_call_settings(tr::now),
showSettings);
showSettings,
&st::menuIconSettings);
if (controller->delegate()->peerListFullRowsCount() > 0) {
(*menu)->addAction(
tr::lng_call_box_clear_all(tr::now),
clearAll);
clearAll,
&st::menuIconDelete);
}
(*menu)->popup(QCursor::pos());
return true;