Skip to content

Commit 3419b49

Browse files
committed
Hide gift value details tooltips on click.
1 parent ec5725d commit 3419b49

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Telegram/SourceFiles/boxes/gift_premium_box.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ For license and copyright information please follow this link:
1010
#include "api/api_premium.h"
1111
#include "api/api_premium_option.h"
1212
#include "apiwrap.h"
13+
#include "base/event_filter.h"
1314
#include "base/timer_rpl.h"
1415
#include "base/unixtime.h"
1516
#include "base/weak_ptr.h"
@@ -106,6 +107,13 @@ void ShowInfoTooltip(
106107
st::defaultImportantTooltip);
107108
tooltip->toggleFast(false);
108109

110+
base::install_event_filter(tooltip, qApp, [=](not_null<QEvent*> e) {
111+
if (e->type() == QEvent::MouseButtonPress) {
112+
tooltip->toggleAnimated(false);
113+
}
114+
return base::EventFilterResult::Continue;
115+
});
116+
109117
const auto update = [=] {
110118
const auto geometry = Ui::MapFrom(parent, target, target->rect());
111119
const auto countPosition = [=](QSize size) {

Telegram/lib_ui

0 commit comments

Comments
 (0)