mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Handle channel event log mouse events.
This commit is contained in:
@@ -52,7 +52,7 @@ const style::TextStyle &BotKeyboard::Style::textStyle() const {
|
||||
return st::botKbStyle;
|
||||
}
|
||||
|
||||
void BotKeyboard::Style::repaint(const HistoryItem *item) const {
|
||||
void BotKeyboard::Style::repaint(gsl::not_null<const HistoryItem*> item) const {
|
||||
_parent->update();
|
||||
}
|
||||
|
||||
@@ -237,10 +237,10 @@ void BotKeyboard::updateSelected() {
|
||||
|
||||
if (!_impl) return;
|
||||
|
||||
QPoint p(mapFromGlobal(_lastMousePos));
|
||||
int x = rtl() ? st::botKbScroll.width : _st->margin;
|
||||
auto p = mapFromGlobal(_lastMousePos);
|
||||
auto x = rtl() ? st::botKbScroll.width : _st->margin;
|
||||
|
||||
auto link = _impl->getState(p.x() - x, p.y() - _st->margin);
|
||||
auto link = _impl->getState(p - QPoint(x, _st->margin));
|
||||
if (ClickHandler::setActive(link, this)) {
|
||||
Ui::Tooltip::Hide();
|
||||
setCursor(link ? style::cur_pointer : style::cur_default);
|
||||
|
@@ -92,7 +92,7 @@ private:
|
||||
|
||||
void startPaint(Painter &p) const override;
|
||||
const style::TextStyle &textStyle() const override;
|
||||
void repaint(const HistoryItem *item) const override;
|
||||
void repaint(gsl::not_null<const HistoryItem*> item) const override;
|
||||
|
||||
protected:
|
||||
void paintButtonBg(Painter &p, const QRect &rect, float64 howMuchOver) const override;
|
||||
|
@@ -900,7 +900,7 @@ void GifsListWidget::updateSelected() {
|
||||
}
|
||||
if (col < inlineItems.size()) {
|
||||
sel = row * MatrixRowShift + col;
|
||||
inlineItems.at(col)->getState(lnk, cursor, sx, sy);
|
||||
inlineItems.at(col)->getState(lnk, cursor, QPoint(sx, sy));
|
||||
lnkhost = inlineItems.at(col);
|
||||
} else {
|
||||
row = col = -1;
|
||||
|
Reference in New Issue
Block a user