mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-22 12:25:45 +03:00
Move wizard options to CMAKE as well
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
5c2996deb7
commit
944f9e9668
5 changed files with 15 additions and 24 deletions
|
@ -22,3 +22,9 @@ option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
|||
#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 )
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#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@
|
||||
|
||||
|
|
|
@ -40,22 +40,4 @@ QVariant NextcloudTheme::customMedia(CustomMediaType)
|
|||
}
|
||||
#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
|
||||
|
||||
}
|
||||
|
|
|
@ -32,12 +32,8 @@ public:
|
|||
#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
|
||||
|
|
|
@ -427,17 +427,21 @@ QIcon Theme::folderOfflineIcon(bool sysTray, bool sysTrayMenuVisible) const
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue