use consistent naming

This commit is contained in:
RickyRister 2025-02-16 22:48:52 -08:00
parent 3b57a626d6
commit ee87cdd77e
4 changed files with 9 additions and 9 deletions

View file

@ -357,7 +357,7 @@ QPixmap LockPixmapGenerator::generatePixmap(int height)
QMap<int, QPixmap> LockPixmapGenerator::pmCache;
QPixmap ExpandIconPixmapGenerator::generatePixmap(int height, bool expanded)
QPixmap DropdownIconPixmapGenerator::generatePixmap(int height, bool expanded)
{
QString key = QString::number(expanded) + ":" + QString::number(height);
if (pmCache.contains(key))
@ -370,7 +370,7 @@ QPixmap ExpandIconPixmapGenerator::generatePixmap(int height, bool expanded)
return pixmap;
}
QMap<QString, QPixmap> ExpandIconPixmapGenerator::pmCache;
QMap<QString, QPixmap> DropdownIconPixmapGenerator::pmCache;
QPixmap loadColorAdjustedPixmap(const QString &name)
{

View file

@ -106,7 +106,7 @@ public:
}
};
class ExpandIconPixmapGenerator
class DropdownIconPixmapGenerator
{
private:
static QMap<QString, QPixmap> pmCache;

View file

@ -46,23 +46,23 @@ void BannerWidget::setText(const QString &text) const
void BannerWidget::setClickable(bool _clickable)
{
clickable = _clickable;
setExpandIconState(true);
setDropdownIconState(true);
}
void BannerWidget::toggleBuddyVisibility() const
{
if (buddy) {
buddy->setVisible(!buddy->isVisible());
setExpandIconState(buddy->isVisible());
setDropdownIconState(buddy->isVisible());
} else {
setExpandIconState(false);
setDropdownIconState(false);
}
}
void BannerWidget::setExpandIconState(bool expanded) const
void BannerWidget::setDropdownIconState(bool expanded) const
{
if (clickable) {
iconLabel->setPixmap(ExpandIconPixmapGenerator::generatePixmap(24, expanded));
iconLabel->setPixmap(DropdownIconPixmapGenerator::generatePixmap(24, expanded));
} else {
// we cannot directly hide the iconLabel, since it's needed to center the text; set an empty image instead
iconLabel->setPixmap(QPixmap());

View file

@ -40,7 +40,7 @@ signals:
void buddyVisibilityChanged();
private slots:
void toggleBuddyVisibility() const;
void setExpandIconState(bool expanded) const;
void setDropdownIconState(bool expanded) const;
};
#endif // BANNER_WIDGET_H