Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Mac fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Duduf committed Mar 20, 2024
1 parent 3713d75 commit 965e055
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/Ramses.pro
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ SOURCES += \
rammanagerwidgets/shotmanagerwidget.cpp \
rammanagerwidgets/statemanagerwidget.cpp \
rammanagerwidgets/stepmanagerwidget.cpp \
rammanagerwidgets/usermanagerwidget.cpp \
ramobjectdelegates/ramobjectdelegate.cpp \
ramobjectmodels/dbtablemodel.cpp \
ramobjectmodels/ramabstractdatamodel.cpp \
Expand Down Expand Up @@ -150,7 +151,6 @@ SOURCES += \
rammanagerwidgets/templateassetgroupmanagerwidget.cpp \
rammanagerwidgets/templatestepmanagerwidget.cpp \
docks/timelinewidget.cpp \
rammanagerwidgets/usermanagerwidget.cpp \
ramfilemetadatamanager.cpp \
ramnamemanager.cpp \
ramobjects/ramabstractobject.cpp \
Expand Down Expand Up @@ -475,14 +475,6 @@ win* {
QMAKE_CXXFLAGS += -Wdeprecated \
-Wdeprecated-copy
} else:macx {

# ==== FRAMELESS WINDOW ====
# Only include / compile these files on OS X
OBJECTIVE_SOURCES += \
OSUtils/mac/OSXHideTitleBar.mm
HEADERS +=\
OSUtils/mac/OSXHideTitleBar.h

# icon
ICON = resources/icons/ramses.icns
CONFIG += sdk_no_version_check
Expand Down
4 changes: 3 additions & 1 deletion src/duqf-app/duui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ void DuUI::setupLayout(QLayout *l, int margin, int spacing)

void DuUI::setDarkTitleBar(QWidget *widget)
{
auto hwnd = reinterpret_cast<HWND>(widget->winId());
#ifdef Q_OS_WIN
auto hwnd = reinterpret_cast<HWND>(widget->winId());
HMODULE hUxtheme = LoadLibraryExW(L"uxtheme.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
HMODULE hUser32 = GetModuleHandleW(L"user32.dll");
fnAllowDarkModeForWindow AllowDarkModeForWindow
Expand All @@ -310,5 +310,7 @@ void DuUI::setDarkTitleBar(QWidget *widget)
sizeof(dark)
};
SetWindowCompositionAttribute(hwnd, &data);
#else
Q_UNUSED(widget)
#endif
}

0 comments on commit 965e055

Please sign in to comment.