From e7fa33021582cd600f83f5ca10f0d62ee73135b5 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 27 Oct 2025 14:17:22 +0300 Subject: [PATCH] Split verified check icon. --- Telegram/SourceFiles/info/info.style | 15 ++++++--------- .../inline_bots/bot_attach_web_view.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index 892fb0e8b4..7c42a83339 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -23,6 +23,7 @@ InfoToggle { InfoPeerBadge { verified: icon; + verifiedCheck: icon; premium: icon; premiumFg: color; position: point; @@ -554,14 +555,12 @@ infoRatingDeductedBadge: RoundButton(customEmojiTextBadge) { infoProfileInaccessibleUserpic: icon {{ "info/inaccessible_userpic", historyPeerUserpicFg }}; infoVerifiedCheckPosition: point(4px, 2px); -infoVerifiedCheck: icon { - { "profile_verified_star", profileVerifiedCheckBg }, - { "profile_verified_check", profileVerifiedCheckFg } -}; +infoVerifiedStar: icon {{ "profile_verified_star", profileVerifiedCheckBg }}; infoPremiumStar: icon {{ "profile_premium", profileVerifiedCheckBg }}; infoPeerBadge: InfoPeerBadge { - verified: infoVerifiedCheck; + verified: infoVerifiedStar; + verifiedCheck: icon {{ "profile_verified_check", profileVerifiedCheckFg }}; premium: infoPremiumStar; premiumFg: profileVerifiedCheckBg; position: infoVerifiedCheckPosition; @@ -571,10 +570,8 @@ infoBotVerifyBadge: InfoPeerBadge(infoPeerBadge) { position: point(-2px, 2px); } infoColoredPeerBadge: InfoPeerBadge(infoPeerBadge) { - verified: icon { - { "profile_verified_star", groupCallMembersFg }, - { "profile_verified_check", groupCallBg } - }; + verified: icon {{ "profile_verified_star", groupCallMembersFg }}; // Will be colorized. + verifiedCheck: icon {{ "profile_verified_check", groupCallMembersFg }}; premium: icon {{ "profile_premium", groupCallMembersFg }}; premiumFg: groupCallMembersFg; } diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp index c555de936b..fd03fb24d5 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp @@ -82,7 +82,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_boxes.h" #include "styles/style_channel_earn.h" #include "styles/style_chat.h" -#include "styles/style_info.h" // infoVerifiedCheck. +#include "styles/style_info.h" // infoVerifiedStar. #include "styles/style_layers.h" #include "styles/style_menu_icons.h" #include "styles/style_window.h" @@ -412,7 +412,7 @@ void FillBotUsepic( title, rpl::single(bot->name()), box->getDelegate()->style().title); - const auto icon = bot->isVerified() ? &st::infoVerifiedCheck : nullptr; + const auto icon = bot->isVerified() ? &st::infoVerifiedStar : nullptr; title->resize( titleLabel->width() + (icon ? icon->width() : 0), titleLabel->height()); @@ -1346,9 +1346,9 @@ void WebViewInstance::show(ShowArgs &&args) { const auto raw = titleBadge.data(); raw->paintRequest() | rpl::start_with_next([=] { auto p = Painter(raw); - st::infoVerifiedCheck.paint(p, st::lineWidth, 0, raw->width()); + st::infoVerifiedStar.paint(p, st::lineWidth, 0, raw->width()); }, raw->lifetime()); - raw->resize(st::infoVerifiedCheck.size() + QSize(0, st::lineWidth)); + raw->resize(st::infoVerifiedStar.size() + QSize(0, st::lineWidth)); } const auto &bots = _session->attachWebView().attachBots();