Core: Remove unneeded ifdefs.

Replace compile-time checks for host OS by run-time checks.

Change-Id: I9f237389171586786c2609f81314bcb1bc17b01e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Christian Kandeler
2013-03-14 10:44:46 +01:00
parent d904557fb3
commit 17765de169
10 changed files with 89 additions and 108 deletions

View File

@@ -30,6 +30,7 @@
#include "fancyactionbar.h"
#include "coreconstants.h"
#include <utils/hostosinfo.h>
#include <utils/stylehelper.h>
#include <utils/stringutils.h>
#include <utils/tooltip/tooltip.h>
@@ -152,8 +153,9 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
// draw borders
bool isTitledAction = defaultAction()->property("titledAction").toBool();
#ifndef Q_OS_MAC // Mac UIs usually don't hover
if (m_fader > 0 && isEnabled() && !isDown() && !isChecked()) {
if (!Utils::HostOsInfo::isMacHost() // Mac UIs usually don't hover
&& m_fader > 0 && isEnabled() && !isDown() && !isChecked()) {
painter.save();
int fader = int(40 * m_fader);
QLinearGradient grad(rect().topLeft(), rect().topRight());
@@ -165,9 +167,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
painter.drawLine(rect().topLeft(), rect().topRight());
painter.drawLine(rect().bottomLeft(), rect().bottomRight());
painter.restore();
} else
#endif
if (isDown() || isChecked()) {
} else if (isDown() || isChecked()) {
painter.save();
QLinearGradient grad(rect().topLeft(), rect().topRight());
grad.setColorAt(0, Qt::transparent);