2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Add some icons to popup menus.

This commit is contained in:
John Preston
2021-12-09 21:56:24 +04:00
parent 535fd8d523
commit 2c36623cfb
212 changed files with 581 additions and 263 deletions

View File

@@ -37,6 +37,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "styles/style_info.h"
#include "styles/style_profile.h"
#include "styles/style_menu_icons.h"
namespace Info {
namespace {
@@ -529,7 +530,9 @@ void WrapWidget::showTopBarMenu() {
Ui::InnerDropdown::HideOption::IgnoreShow);
return;
}
_topBarMenu = base::make_unique_q<Ui::DropdownMenu>(this);
_topBarMenu = base::make_unique_q<Ui::DropdownMenu>(
this,
st::dropdownMenuWithIcons);
_topBarMenu->setHiddenCallback([this] {
InvokeQueued(this, [this] { _topBarMenu = nullptr; });
@@ -551,8 +554,9 @@ void WrapWidget::showTopBarMenu() {
const auto addAction = [=](
const QString &text,
Fn<void()> callback) {
return _topBarMenu->addAction(text, std::move(callback));
Fn<void()> callback,
const style::icon *icon) {
return _topBarMenu->addAction(text, std::move(callback), icon);
};
if (const auto peer = key().peer()) {
Window::FillDialogsEntryMenu(