From 2915133d96ae9488912fa66187704eb2c02addaf Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Wed, 3 Mar 2021 17:14:45 -0600 Subject: [PATCH] Update paths for homebrew on Apple Silicon Macs and use Qt Fusion theme on MacOS --- OpenRGB.pro | 6 +++++- qt/OpenRGBDialog2.cpp | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/OpenRGB.pro b/OpenRGB.pro index ad75345e..8eb3c03f 100644 --- a/OpenRGB.pro +++ b/OpenRGB.pro @@ -816,9 +816,13 @@ unix:macx { INCLUDEPATH += \ /usr/local/include \ + /opt/homebrew/include \ LIBS += \ - -L/usr/local/lib -lusb-1.0 -lhidapi \ + -L/usr/local/lib \ + -L/opt/homebrew/lib \ + -lusb-1.0 \ + -lhidapi \ CONFIG += \ c++14 \ diff --git a/qt/OpenRGBDialog2.cpp b/qt/OpenRGBDialog2.cpp index 2b3e2b45..c1f628cf 100644 --- a/qt/OpenRGBDialog2.cpp +++ b/qt/OpenRGBDialog2.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef _WIN32 #include @@ -259,7 +260,6 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op /*-------------------------------------------------*\ | Apply dark theme on Windows if configured | \*-------------------------------------------------*/ - if(IsDarkTheme()) { QPalette pal = palette(); @@ -271,6 +271,14 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op } #endif +#ifdef __APPLE__ + /*-------------------------------------------------*\ + | Apply Qt Fusion theme on MacOS, as the MacOS | + | default theme does not handle vertical tabs well | + \*-------------------------------------------------*/ + QApplication::setStyle(QStyleFactory::create("Fusion")); +#endif + /*-----------------------------------------------------*\ | Update the profile list | \*-----------------------------------------------------*/