Hide gift value details tooltips on click.

This commit is contained in:
John Preston
2025-09-01 17:52:15 +04:00
parent ec5725d8de
commit 3419b49381
2 changed files with 9 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "api/api_premium.h"
#include "api/api_premium_option.h"
#include "apiwrap.h"
#include "base/event_filter.h"
#include "base/timer_rpl.h"
#include "base/unixtime.h"
#include "base/weak_ptr.h"
@@ -106,6 +107,13 @@ void ShowInfoTooltip(
st::defaultImportantTooltip);
tooltip->toggleFast(false);
base::install_event_filter(tooltip, qApp, [=](not_null<QEvent*> e) {
if (e->type() == QEvent::MouseButtonPress) {
tooltip->toggleAnimated(false);
}
return base::EventFilterResult::Continue;
});
const auto update = [=] {
const auto geometry = Ui::MapFrom(parent, target, target->rect());
const auto countPosition = [=](QSize size) {