diff --git a/.gitignore b/.gitignore index 85a87ed91464..f3505a5ff4be 100644 --- a/.gitignore +++ b/.gitignore @@ -190,3 +190,6 @@ convert.exe *-w10startmenu.png *state-*.png theme.qrc + +# Ignore specific folders +shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d65f503d8da..5cf4d98b6209 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,9 @@ include(FeatureSummary) set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") +set(NMC_RCC_FILE "nmctheme_v1.rcc") +configure_file(${CMAKE_SOURCE_DIR}/${NMC_RCC_FILE} "${BIN_OUTPUT_DIRECTORY}/${NMC_RCC_FILE}" COPYONLY) + include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake) # CfAPI Shell Extensions @@ -295,6 +298,7 @@ configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) if(BUILD_OWNCLOUD_OSX_BUNDLE) install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/) configure_file(sync-exclude.lst bin/${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY) + install(FILES nmctheme_v1.rcc DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/) elseif(BUILD_CLIENT) install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} ) configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY) diff --git a/nmcreadme.txt b/nmcreadme.txt new file mode 100644 index 000000000000..a35f34f9ab9c --- /dev/null +++ b/nmcreadme.txt @@ -0,0 +1 @@ +These files were used to generate an .rcc file. Use the nmctheme.qrc.in file to generate the .qrc file. You could copy paste the content from nmctheme.qrc.in to theme.qrc.in and rerun cmake in your IDE or whereever, then use theme.qrc to generate an .rcc file. After the job is done, restore the theme.qrc.in file and rerun cmake again, so the original theme.qrc is restored, or use git to restore the files. \ No newline at end of file diff --git a/nmctheme_v1.rcc b/nmctheme_v1.rcc new file mode 100644 index 000000000000..1e673f886e4f Binary files /dev/null and b/nmctheme_v1.rcc differ diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 1968683e2341..631738dc2834 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -2,6 +2,9 @@ project(gui) find_package(Qt5 REQUIRED COMPONENTS Widgets Svg Qml Quick QuickControls2 Xml Network) find_package(KF5Archive REQUIRED) +#NMC change, its needed to find the ui file in a different location than the header file +set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/src/gui") + if(QUICK_COMPILER) find_package(Qt5QuickCompiler) set_package_properties(Qt5QuickCompiler PROPERTIES @@ -260,6 +263,10 @@ set(client_SRCS wizard/linklabel.cpp ) +file(GLOB NMC_FILES "nmcgui/*") +set(NMC_SRCS ${NMC_FILES}) +list(APPEND client_SRCS ${NMC_SRCS}) + if (Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) list(APPEND client_SRCS wizard/webviewpage.h @@ -586,6 +593,7 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE) install(FILES ${VISUAL_ELEMENTS} DESTINATION bin/visualelements) install(FILES "${theme_dir}/${APPLICATION_EXECUTABLE}.VisualElementsManifest.xml" DESTINATION bin) install(FILES ${client_I18N} DESTINATION i18n) + install(FILES ${CMAKE_SOURCE_DIR}/nmctheme_v1.rcc DESTINATION bin) endif() # we may not add MACOSX_BUNDLE here, if not building one diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 6742a8b1a0e5..a5ee49bcadf4 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -58,6 +58,17 @@ int main(int argc, char **argv) #ifdef Q_OS_WIN SetDllDirectory(L""); #endif + bool resourceLoaded = false; + const QString currentPath = QDir::currentPath(); + if(Utility::isMac()) + { + resourceLoaded = QResource::registerResource(QDir::toNativeSeparators("/Applications/MagentaCLOUD.app/Contents/Resources/nmctheme_v1.rcc")); + } + else if(Utility::isWindows() || !resourceLoaded) + { + resourceLoaded = QResource::registerResource(QDir::toNativeSeparators(currentPath + "/nmctheme_v1.rcc")); + } + Q_INIT_RESOURCE(resources); Q_INIT_RESOURCE(theme); diff --git a/theme/NMCIcons/accountAvatarIcon.svg b/theme/NMCIcons/accountAvatarIcon.svg new file mode 100644 index 000000000000..32257de876c4 --- /dev/null +++ b/theme/NMCIcons/accountAvatarIcon.svg @@ -0,0 +1,7 @@ + + + icon/user_file/user/default@svg + + + + \ No newline at end of file diff --git a/theme/NMCIcons/action-add.svg b/theme/NMCIcons/action-add.svg new file mode 100644 index 000000000000..46df2f888cc1 --- /dev/null +++ b/theme/NMCIcons/action-add.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/theme/NMCIcons/applicationLogo.svg b/theme/NMCIcons/applicationLogo.svg new file mode 100644 index 000000000000..efc8c94e1df2 --- /dev/null +++ b/theme/NMCIcons/applicationLogo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/theme/NMCIcons/cloud-security.svg b/theme/NMCIcons/cloud-security.svg new file mode 100644 index 000000000000..bfa4b9cfc802 --- /dev/null +++ b/theme/NMCIcons/cloud-security.svg @@ -0,0 +1,7 @@ + + + /svg/icon/content/cloud-security/default + + + + \ No newline at end of file diff --git a/theme/NMCIcons/collapse-down.svg b/theme/NMCIcons/collapse-down.svg new file mode 100644 index 000000000000..b63406256c81 --- /dev/null +++ b/theme/NMCIcons/collapse-down.svg @@ -0,0 +1,7 @@ + + + /svg/icon/navigation/collapse-down/default + + + + \ No newline at end of file diff --git a/theme/NMCIcons/collapse-right.svg b/theme/NMCIcons/collapse-right.svg new file mode 100644 index 000000000000..c353781f763c --- /dev/null +++ b/theme/NMCIcons/collapse-right.svg @@ -0,0 +1,7 @@ + + + /svg/icon/navigation/right/default + + + + \ No newline at end of file diff --git a/theme/NMCIcons/configuration1.png b/theme/NMCIcons/configuration1.png new file mode 100644 index 000000000000..7a20bc1a1134 Binary files /dev/null and b/theme/NMCIcons/configuration1.png differ diff --git a/theme/NMCIcons/configuration2.png b/theme/NMCIcons/configuration2.png new file mode 100644 index 000000000000..dbdac7d23fca Binary files /dev/null and b/theme/NMCIcons/configuration2.png differ diff --git a/theme/NMCIcons/configuration3.png b/theme/NMCIcons/configuration3.png new file mode 100644 index 000000000000..66d2d513c8ad Binary files /dev/null and b/theme/NMCIcons/configuration3.png differ diff --git a/theme/NMCIcons/folderLogo.svg b/theme/NMCIcons/folderLogo.svg new file mode 100644 index 000000000000..45f4cb770d6b --- /dev/null +++ b/theme/NMCIcons/folderLogo.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/theme/NMCIcons/logout.svg b/theme/NMCIcons/logout.svg new file mode 100644 index 000000000000..babca11ccf86 --- /dev/null +++ b/theme/NMCIcons/logout.svg @@ -0,0 +1,7 @@ + + + /svg/icon/action/logout/default + + + + \ No newline at end of file diff --git a/theme/NMCIcons/navigation-left.svg b/theme/NMCIcons/navigation-left.svg new file mode 100644 index 000000000000..bfa5fa38304b --- /dev/null +++ b/theme/NMCIcons/navigation-left.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/theme/NMCIcons/navigation-right.svg b/theme/NMCIcons/navigation-right.svg new file mode 100644 index 000000000000..a008c1d637d6 --- /dev/null +++ b/theme/NMCIcons/navigation-right.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/theme/NMCIcons/pause.svg b/theme/NMCIcons/pause.svg new file mode 100644 index 000000000000..7d8cc0999d9e --- /dev/null +++ b/theme/NMCIcons/pause.svg @@ -0,0 +1,7 @@ + + + icon/action/pause/default@svg + + + + \ No newline at end of file diff --git a/theme/NMCIcons/remove.svg b/theme/NMCIcons/remove.svg new file mode 100644 index 000000000000..9896ad3ca78a --- /dev/null +++ b/theme/NMCIcons/remove.svg @@ -0,0 +1,7 @@ + + + /svg/icon/action/remove/default + + + + \ No newline at end of file diff --git a/theme/NMCIcons/tlogocarrier.svg b/theme/NMCIcons/tlogocarrier.svg new file mode 100644 index 000000000000..8fb2ff11a105 --- /dev/null +++ b/theme/NMCIcons/tlogocarrier.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/NMCIcons/website.svg b/theme/NMCIcons/website.svg new file mode 100644 index 000000000000..4e7414d046c1 --- /dev/null +++ b/theme/NMCIcons/website.svg @@ -0,0 +1,7 @@ + + + icon/content/news/default@svg + + + + \ No newline at end of file