tdesktop/Telegram/SourceFiles/ui/controls/jump_down_button.h

37 lines
779 B
C
Raw Normal View History

2022-12-19 11:48:24 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "ui/widgets/buttons.h"
namespace Ui {
class JumpDownButton final : public RippleButton {
public:
JumpDownButton(QWidget *parent, const style::TwoIconButton &st);
void setUnreadCount(int unreadCount);
[[nodiscard]] int unreadCount() const {
return _unreadCount;
}
protected:
void paintEvent(QPaintEvent *e) override;
QImage prepareRippleMask() const override;
QPoint prepareRippleStartPosition() const override;
private:
const style::TwoIconButton &_st;
int _unreadCount = 0;
};
} // namespace Ui