UI Nits: Fix Mac button icons weirdness

The Mac button icons would go a bit odd, this seems
to be caused by not setting an alternate image for
buttons (they have two images one for each state).
This commit is contained in:
Mark Liversedge
2012-12-27 20:18:42 +00:00
parent dfd6741cc4
commit 6a73b0e650
2 changed files with 6 additions and 2 deletions

View File

@@ -243,8 +243,10 @@ void QtMacButton::setText(const QString &text)
void QtMacButton::setImage(const QPixmap &image)
{
Q_ASSERT(qtw);
if (qtw)
if (qtw) {
[qtw->nsButton setImage:fromQPixmap(image)];
[qtw->nsButton setAlternateImage:fromQPixmap(image)];
}
}
void QtMacButton::setChecked(bool checked)

View File

@@ -217,8 +217,10 @@ void QtMacPopUpButton::setText(const QString &text)
void QtMacPopUpButton::setImage(const QPixmap &image)
{
Q_ASSERT(qtw);
if (qtw)
if (qtw) {
[qtw->nsPopUpButton setImage:fromQPixmap(image)];
[qtw->nsPopUpButton setAlternateImage:fromQPixmap(image)];
}
}
void QtMacPopUpButton::setChecked(bool checked)