Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] Remove shadows on macOS to improve performance #586

Merged
merged 2 commits into from Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/assets.cpp
Expand Up @@ -1905,6 +1905,7 @@ bool CAssetsCache::AddReissueAsset(const CReissueAsset& reissue, const std::stri
}

return true;

}

//! Changes Memory Only
Expand Down
3 changes: 3 additions & 0 deletions src/qt/guiutil.cpp
Expand Up @@ -145,6 +145,9 @@ QFont getTopLabelFont()

QGraphicsDropShadowEffect* getShadowEffect()
{
#if defined(Q_OS_MAC)
return nullptr;
#endif
QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect;
shadow->setBlurRadius(50);
shadow->setColor(darkModeEnabled ? COLOR_SHADOW_DARK : COLOR_SHADOW_LIGHT);
Expand Down
2 changes: 2 additions & 0 deletions src/qt/ravengui.cpp
Expand Up @@ -661,12 +661,14 @@ void RavenGUI::createToolBars()
mainWalletWidget->setStyleSheet(mainWalletWidgetStyle);

/** Create the shadow effects for the main wallet frame. Make it so it puts a shadow on the tool bar */
#if !defined(Q_OS_MAC)
QGraphicsDropShadowEffect *walletFrameShadow = new QGraphicsDropShadowEffect;
walletFrameShadow->setBlurRadius(50);
walletFrameShadow->setColor(COLOR_WALLETFRAME_SHADOW);
walletFrameShadow->setXOffset(-8.0);
walletFrameShadow->setYOffset(0);
mainWalletWidget->setGraphicsEffect(walletFrameShadow);
#endif

QString widgetBackgroundSytleSheet = QString(".QWidget{background-color: %1}").arg(platformStyle->TopWidgetBackGroundColor().name());

Expand Down