mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Profile members block displayed when mouse is over group members count.
This commit is contained in:
@@ -24,22 +24,12 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
|
||||
namespace Profile {
|
||||
|
||||
class BlockWidget : public TWidget, public Notify::Observer {
|
||||
class BlockWidget : public ScrolledWidget, public Notify::Observer {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BlockWidget(QWidget *parent, PeerData *peer, const QString &title);
|
||||
|
||||
// Count new height for width=newWidth and resize to it.
|
||||
void resizeToWidth(int newWidth);
|
||||
|
||||
// Updates the area that is visible inside the scroll container.
|
||||
virtual void setVisibleTopBottom(int visibleTop, int visibleBottom) {
|
||||
}
|
||||
|
||||
virtual ~BlockWidget() {
|
||||
}
|
||||
|
||||
signals:
|
||||
void heightUpdated();
|
||||
|
||||
@@ -52,7 +42,7 @@ protected:
|
||||
int contentTop() const;
|
||||
|
||||
// Resizes content and counts natural widget height for the desired width.
|
||||
virtual int resizeGetHeight(int newWidth) = 0;
|
||||
int resizeGetHeight(int newWidth) override = 0;
|
||||
|
||||
void contentSizeUpdated() {
|
||||
resizeToWidth(width());
|
||||
@@ -63,7 +53,13 @@ protected:
|
||||
return _peer;
|
||||
}
|
||||
|
||||
bool emptyTitle() const {
|
||||
return _title.isEmpty();
|
||||
}
|
||||
|
||||
private:
|
||||
void paintTitle(Painter &p);
|
||||
|
||||
PeerData *_peer;
|
||||
QString _title;
|
||||
|
||||
|
Reference in New Issue
Block a user