mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Handle only left click on voice chat bar.
This commit is contained in:
parent
9e79b59cce
commit
05ffc79539
1 changed files with 7 additions and 2 deletions
|
@ -220,7 +220,9 @@ void GroupCallBar::setupInner() {
|
||||||
_inner->setCursor(style::cur_pointer);
|
_inner->setCursor(style::cur_pointer);
|
||||||
_inner->events(
|
_inner->events(
|
||||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||||
return (event->type() == QEvent::MouseButtonPress);
|
return (event->type() == QEvent::MouseButtonPress)
|
||||||
|
&& (static_cast<QMouseEvent*>(event.get())->button()
|
||||||
|
== Qt::LeftButton);
|
||||||
}) | rpl::map([=] {
|
}) | rpl::map([=] {
|
||||||
return _inner->events(
|
return _inner->events(
|
||||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||||
|
@ -441,7 +443,10 @@ rpl::producer<> GroupCallBar::barClicks() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
rpl::producer<> GroupCallBar::joinClicks() const {
|
rpl::producer<> GroupCallBar::joinClicks() const {
|
||||||
return _joinClicks.events() | rpl::to_empty;
|
using namespace rpl::mappers;
|
||||||
|
return _joinClicks.events()
|
||||||
|
| rpl::filter(_1 == Qt::LeftButton)
|
||||||
|
| rpl::to_empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
Loading…
Add table
Reference in a new issue