some bug fixes, initial work on avatars in dialog windows
This commit is contained in:
parent
867c3a18e9
commit
f13b43d38b
18 changed files with 125 additions and 42 deletions
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QResizeEvent>
|
||||
#include <QIcon>
|
||||
|
||||
/**
|
||||
* @todo write docs
|
||||
|
@ -29,7 +31,6 @@ class Image : public QLabel
|
|||
{
|
||||
public:
|
||||
Image(const QString& path, quint16 minWidth = 50, QWidget* parent = nullptr);
|
||||
|
||||
~Image();
|
||||
|
||||
int heightForWidth(int width) const override;
|
||||
|
@ -40,11 +41,14 @@ public:
|
|||
|
||||
private:
|
||||
QPixmap pixmap;
|
||||
QString path;
|
||||
qreal aspectRatio;
|
||||
quint16 minWidth;
|
||||
bool svgMode;
|
||||
|
||||
private:
|
||||
void recalculateAspectRatio();
|
||||
void resizeEvent(QResizeEvent * event) override;
|
||||
};
|
||||
|
||||
#endif // IMAGE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue