Skip to content

Commit 630d891

Browse files
committed
Merge #400 [stable-4.0] [master] Central_Customization
2 parents 9346fca + acdff00 commit 630d891

21 files changed

Lines changed: 149 additions & 12 deletions

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ endif()
2828

2929
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
3030

31+
set(NMC_RCC_FILE "nmctheme_v1.rcc")
32+
configure_file(${CMAKE_SOURCE_DIR}/${NMC_RCC_FILE} "${BIN_OUTPUT_DIRECTORY}/${NMC_RCC_FILE}" COPYONLY)
33+
3134
include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)
3235

3336
set(QT_VERSION_MAJOR "6")
@@ -368,6 +371,7 @@ configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
368371
if(BUILD_OWNCLOUD_OSX_BUNDLE)
369372
install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
370373
configure_file(sync-exclude.lst bin/${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
374+
install(FILES nmctheme_v1.rcc DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
371375
elseif(BUILD_CLIENT)
372376
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
373377
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)

magenta_theme.qrc.in

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<RCC>
2+
<qresource prefix="/client/magenta">
3+
<!-- NMC CC icons -->
4+
<file>theme/NMCIcons/accountAvatarIcon.svg</file>
5+
<file>theme/NMCIcons/action-add.svg</file>
6+
<file>theme/NMCIcons/cloud-security.svg</file>
7+
<file>theme/NMCIcons/collapse-down.svg</file>
8+
<file>theme/NMCIcons/collapse-right.svg</file>
9+
<file>theme/NMCIcons/configuration1.png</file>
10+
<file>theme/NMCIcons/configuration2.png</file>
11+
<file>theme/NMCIcons/configuration3.png</file>
12+
<file>theme/NMCIcons/logout.svg</file>
13+
<file>theme/NMCIcons/navigation-left.svg</file>
14+
<file>theme/NMCIcons/navigation-right.svg</file>
15+
<file>theme/NMCIcons/pause.svg</file>
16+
<file>theme/NMCIcons/remove.svg</file>
17+
<file>theme/NMCIcons/website.svg</file>
18+
19+
<!-- NMC CMW icons -->
20+
<file>theme/NMCIcons/accountAvatarIcon-white.svg</file>
21+
<file>theme/NMCIcons/logout-white.svg</file>
22+
<file>theme/NMCIcons/pause-white.svg</file>
23+
<file>theme/NMCIcons/remove-white.svg</file>
24+
<file>theme/NMCIcons/website-white.svg</file>
25+
<file>theme/close-white.svg</file>
26+
<file>theme/more-white.svg</file>
27+
<file>theme/settings-white.svg</file>
28+
29+
<!-- NMC RWI icons -->
30+
<file>theme/NMCIcons/ApplicationLogo.svg</file>
31+
<file>theme/NMCIcons/folderLogo.svg</file>
32+
<file>theme/NMCIcons/tlogocarrier.svg</file>
33+
</qresource>
34+
</RCC>

nmctheme_v1.rcc

4.11 MB
Binary file not shown.

src/gui/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ set(client_UI_SRCS
6161
)
6262

6363
qt_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
64+
qt_add_resources(client_resources ${CMAKE_SOURCE_DIR}/magenta_theme.qrc)
6465

6566
set(client_SRCS
6667
accountmanager.h
@@ -620,6 +621,7 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
620621
install(FILES ${VISUAL_ELEMENTS} DESTINATION bin/visualelements)
621622
install(FILES "${theme_dir}/${APPLICATION_EXECUTABLE}.VisualElementsManifest.xml" DESTINATION bin)
622623
install(FILES ${client_I18N} DESTINATION i18n)
624+
install(FILES ${CMAKE_SOURCE_DIR}/nmctheme_v1.rcc DESTINATION bin)
623625
endif()
624626

625627
# 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
@@ -56,6 +56,17 @@ int main(int argc, char **argv)
5656
qputenv("QML_IMPORT_PATH", (QDir::currentPath() + QStringLiteral("/qml")).toLatin1());
5757
#endif
5858

59+
bool resourceLoaded = false;
60+
const QString currentPath = QDir::currentPath();
61+
62+
if (Utility::isMac()) {
63+
resourceLoaded = QResource::registerResource(QDir::toNativeSeparators("/Applications/MagentaCLOUD.app/Contents/Resources/nmctheme_v1.rcc"));
64+
}
65+
66+
if (Utility::isWindows() || !resourceLoaded) {
67+
resourceLoaded = QResource::registerResource(QDir::toNativeSeparators(currentPath + "/nmctheme_v1.rcc"));
68+
}
69+
5970
Q_INIT_RESOURCE(resources);
6071
Q_INIT_RESOURCE(theme);
6172

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

theme/NMCIcons/collapse-right.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)