[img-editor] Fixed current style check display in text item menu.

Related commit: 092f81dad6.
This commit is contained in:
23rd
2026-08-28 15:52:37 +03:00
parent e3b338e0db
commit 78757b472c

View File

@@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/emoji_config.h"
#include "ui/painter.h"
#include "ui/widgets/popup_menu.h"
#include "styles/style_media_player.h"
#include "styles/style_media_view.h"
#include "styles/style_menu_icons.h"
@@ -601,13 +602,10 @@ void ItemText::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) {
TextStyle style,
const style::icon *icon) {
const auto checked = (_textStyle == style);
auto action = _contextMenu->addAction(
_contextMenu->addAction(
text,
[=] { setTextStyle(style); },
icon);
if (checked) {
action->setChecked(true);
}
checked ? &st::mediaPlayerMenuCheck : icon);
};
add(
tr::lng_photo_editor_text_style_plain(tr::now),