#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
option( WITH_PROVIDERS "Build with providers list" ON )
+
+
+## Theming options
+set( APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "#0082c9" CACHE string "Hex color of the wizard header background")
+set( APPLICATION_WIZARD_HEADER_TITLE_COLOR "#ffffff" CACHE string "Hex color of the text in the wizard header")
+option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/colored/wizard_logo.png' else the default application icon is used" ON )
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
#cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@"
#cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@"
+#cmakedefine APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "@APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR@"
+#cmakedefine APPLICATION_WIZARD_HEADER_TITLE_COLOR "@APPLICATION_WIZARD_HEADER_TITLE_COLOR@"
+#cmakedefine APPLICATION_WIZARD_USE_CUSTOM_LOGO "@APPLICATION_WIZARD_USE_CUSTOM_LOGO@"
#cmakedefine ZLIB_FOUND @ZLIB_FOUND@
}
#endif
-#ifndef TOKEN_AUTH_ONLY
-QColor NextcloudTheme::wizardHeaderBackgroundColor() const
-{
- return QColor("#0082c9");
-}
-
-QColor NextcloudTheme::wizardHeaderTitleColor() const
-{
- return QColor("#ffffff");
-}
-
-QPixmap NextcloudTheme::wizardHeaderLogo() const
-{
- return QPixmap(hidpiFileName(":/client/theme/colored/wizard_logo.png"));
-}
-
-#endif
-
}
#ifndef TOKEN_AUTH_ONLY
QVariant customMedia(CustomMediaType type) override;
- QColor wizardHeaderBackgroundColor() const override;
- QColor wizardHeaderTitleColor() const override;
- QPixmap wizardHeaderLogo() const override;
#endif
-private:
};
}
#endif // NEXTCLOUD_THEME_H
QColor Theme::wizardHeaderTitleColor() const
{
- return qApp->palette().text().color();
+ return QColor(APPLICATION_WIZARD_HEADER_TITLE_COLOR);
}
QColor Theme::wizardHeaderBackgroundColor() const
{
- return QColor();
+ return QColor(APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR);
}
QPixmap Theme::wizardHeaderLogo() const
{
+#ifdef APPLICATION_WIZARD_USE_CUSTOM_LOGO
+ return QPixmap(hidpiFileName(":/client/theme/colored/wizard_logo.png"));
+#else
return applicationIcon().pixmap(64);
+#endif
}
QPixmap Theme::wizardHeaderBanner() const