Add folder dropdown icons to VDS (#5632)

* add svg

* update pixmap cache

* get icon to work

* hide icon when not clickable

* use consistent naming

* use expandOnly because apparently that leads to higher image quality
This commit is contained in:
RickyRister 2025-02-25 15:36:48 -08:00 committed by GitHub
parent 4543038fd8
commit 6f5d369416
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 82 additions and 8 deletions

View file

@ -16,6 +16,7 @@ public:
int transparency = 80);
void mousePressEvent(QMouseEvent *event) override;
void setText(const QString &text) const;
void setClickable(bool _clickable);
void setBuddy(QWidget *_buddy)
{
buddy = _buddy;
@ -24,16 +25,12 @@ public:
{
return bannerLabel->text();
}
void setClickable(bool _clickable)
{
clickable = _clickable;
}
protected:
void paintEvent(QPaintEvent *event) override;
private:
QVBoxLayout *layout;
QLabel *iconLabel;
QLabel *bannerLabel;
Qt::Orientation gradientOrientation;
int transparency; // Transparency percentage for the gradient
@ -43,6 +40,7 @@ signals:
void buddyVisibilityChanged();
private slots:
void toggleBuddyVisibility() const;
void setDropdownIconState(bool expanded) const;
};
#endif // BANNER_WIDGET_H