Skip to content

Commit 79e19b1

Browse files
committed
Merge #372 [stable-3.16] nmc/2025/Central_Customization
2 parents d34e49e + 6f05466 commit 79e19b1

24 files changed

Lines changed: 157 additions & 0 deletions

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ set(CMAKE_XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES)
2121

2222
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
2323

24+
set(NMC_RCC_FILE "nmctheme_v1.rcc")
25+
configure_file(${CMAKE_SOURCE_DIR}/${NMC_RCC_FILE} "${BIN_OUTPUT_DIRECTORY}/${NMC_RCC_FILE}" COPYONLY)
26+
2427
include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)
2528

2629
set(QT_VERSION_MAJOR "6")
@@ -352,6 +355,7 @@ configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
352355
if(BUILD_OWNCLOUD_OSX_BUNDLE)
353356
install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
354357
configure_file(sync-exclude.lst bin/${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
358+
install(FILES nmctheme_v1.rcc DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
355359
elseif(BUILD_CLIENT)
356360
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
357361
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)

nmctheme_v1.rcc

4.11 MB
Binary file not shown.

src/gui/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
626626
install(FILES ${VISUAL_ELEMENTS} DESTINATION bin/visualelements)
627627
install(FILES "${theme_dir}/${APPLICATION_EXECUTABLE}.VisualElementsManifest.xml" DESTINATION bin)
628628
install(FILES ${client_I18N} DESTINATION i18n)
629+
install(FILES ${CMAKE_SOURCE_DIR}/nmctheme_v1.rcc DESTINATION bin)
629630
endif()
630631

631632
# we may not add MACOSX_BUNDLE here, if not building one

src/gui/main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ int main(int argc, char **argv)
6464
qputenv("QML_IMPORT_PATH", (QDir::currentPath() + QStringLiteral("/qml")).toLatin1());
6565
#endif
6666

67+
bool resourceLoaded = false;
68+
const QString currentPath = QDir::currentPath();
69+
70+
if (Utility::isMac()) {
71+
resourceLoaded = QResource::registerResource(QDir::toNativeSeparators("/Applications/MagentaCLOUD.app/Contents/Resources/nmctheme_v1.rcc"));
72+
}
73+
74+
if (Utility::isWindows() || !resourceLoaded) {
75+
resourceLoaded = QResource::registerResource(QDir::toNativeSeparators(currentPath + "/nmctheme_v1.rcc"));
76+
}
77+
6778
Q_INIT_RESOURCE(resources);
6879
Q_INIT_RESOURCE(theme);
6980

theme.qrc.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,20 @@
208208
<file>theme/close.svg</file>
209209
<file>theme/black/close.svg</file>
210210
<file>theme/white/close.svg</file>
211+
<file>theme/NMCIcons/accountAvatarIcon.svg</file>
212+
<file>theme/NMCIcons/action-add.svg</file>
213+
<file>theme/NMCIcons/cloud-security.svg</file>
214+
<file>theme/NMCIcons/collapse-down.svg</file>
215+
<file>theme/NMCIcons/collapse-right.svg</file>
216+
<file>theme/NMCIcons/configuration1.png</file>
217+
<file>theme/NMCIcons/configuration2.png</file>
218+
<file>theme/NMCIcons/configuration3.png</file>
219+
<file>theme/NMCIcons/logout.svg</file>
220+
<file>theme/NMCIcons/navigation-left.svg</file>
221+
<file>theme/NMCIcons/navigation-right.svg</file>
222+
<file>theme/NMCIcons/pause.svg</file>
223+
<file>theme/NMCIcons/remove.svg</file>
224+
<file>theme/NMCIcons/website.svg</file>
211225
<file>theme/files.svg</file>
212226
<file>theme/public.svg</file>
213227
<file>theme/settings.svg</file>
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

theme/NMCIcons/action-add.svg

Lines changed: 12 additions & 0 deletions
Loading

theme/NMCIcons/cloud-security.svg

Lines changed: 7 additions & 0 deletions
Loading

theme/NMCIcons/collapse-down.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)