mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
don't show icon if there's no buddy
This commit is contained in:
parent
d424e69563
commit
9d093782a6
1 changed files with 2 additions and 3 deletions
|
|
@ -67,9 +67,8 @@ void BannerWidget::toggleBuddyVisibility() const
|
||||||
|
|
||||||
void BannerWidget::updateDropdownIconState() const
|
void BannerWidget::updateDropdownIconState() const
|
||||||
{
|
{
|
||||||
if (clickable) {
|
if (clickable && buddy) {
|
||||||
bool expanded = buddy && !buddy->isHidden();
|
iconLabel->setPixmap(DropdownIconPixmapGenerator::generatePixmap(24, !buddy->isHidden()));
|
||||||
iconLabel->setPixmap(DropdownIconPixmapGenerator::generatePixmap(24, expanded));
|
|
||||||
} else {
|
} else {
|
||||||
// we cannot directly hide the iconLabel, since it's needed to center the text; set an empty image instead
|
// we cannot directly hide the iconLabel, since it's needed to center the text; set an empty image instead
|
||||||
iconLabel->setPixmap(QPixmap());
|
iconLabel->setPixmap(QPixmap());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue