mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Theming cleanups
- remove splash screen pixmap - remove backend icon (folderIcon()) - Move owncloud ad into owncloud theme
This commit is contained in:
parent
8ec2457965
commit
91b5f1076f
@ -78,32 +78,6 @@ QString ownCloudTheme::about() const
|
||||
.arg(devString);
|
||||
}
|
||||
|
||||
QPixmap ownCloudTheme::splashScreen() const
|
||||
{
|
||||
return QPixmap(QLatin1String(":/mirall/resources/owncloud_splash.png"));
|
||||
}
|
||||
|
||||
QIcon ownCloudTheme::folderIcon( const QString& backend ) const
|
||||
{
|
||||
QString name;
|
||||
|
||||
if( backend == QLatin1String("owncloud")) {
|
||||
name = QLatin1String( "owncloud-framed" );
|
||||
}
|
||||
if( backend == QLatin1String("unison" )) {
|
||||
name = QLatin1String( "folder-sync" );
|
||||
}
|
||||
if( backend == QLatin1String("csync" )) {
|
||||
name = QLatin1String( "folder-remote" );
|
||||
}
|
||||
if( backend.isEmpty() || backend == QLatin1String("none") ) {
|
||||
name = QLatin1String("folder-grey");
|
||||
}
|
||||
|
||||
qDebug() << "==> load folder icon " << name;
|
||||
return themeIcon( name );
|
||||
}
|
||||
|
||||
QIcon ownCloudTheme::trayFolderIcon( const QString& ) const
|
||||
{
|
||||
QPixmap fallback = qApp->style()->standardPixmap(QStyle::SP_FileDialogNewFolder);
|
||||
@ -121,6 +95,18 @@ QIcon ownCloudTheme::applicationIcon( ) const
|
||||
return themeIcon( QLatin1String("owncloud-icon") );
|
||||
}
|
||||
|
||||
QVariant ownCloudTheme::customMedia(Theme::CustomMediaType type)
|
||||
{
|
||||
if (type == Theme::oCSetupTop) {
|
||||
return QCoreApplication::translate("ownCloudTheme",
|
||||
"If you don't have an ownCloud server yet, "
|
||||
"see <a href=\"https://owncloud.com\">owncloud.com</a> for more info.",
|
||||
"Top text in setup wizard. Keep short!");
|
||||
} else {
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
QColor ownCloudTheme::wizardHeaderBackgroundColor() const
|
||||
{
|
||||
return QColor("#1d2d42");
|
||||
|
||||
@ -34,6 +34,8 @@ public:
|
||||
QIcon folderDisabledIcon() const;
|
||||
QIcon applicationIcon() const;
|
||||
|
||||
QVariant customMedia(CustomMediaType type);
|
||||
|
||||
QColor wizardHeaderBackgroundColor() const;
|
||||
QColor wizardHeaderTitleColor() const;
|
||||
|
||||
|
||||
@ -130,16 +130,12 @@ void OwncloudSetupPage::setServerUrl( const QString& newUrl )
|
||||
void OwncloudSetupPage::setupCustomization()
|
||||
{
|
||||
// set defaults for the customize labels.
|
||||
|
||||
// _ui.topLabel->hide();
|
||||
_ui.topLabel->hide();
|
||||
_ui.bottomLabel->hide();
|
||||
|
||||
Theme *theme = Theme::instance();
|
||||
QVariant variant = theme->customMedia( Theme::oCSetupTop );
|
||||
if( variant.isNull() ) {
|
||||
_ui.topLabel->setOpenExternalLinks(true);
|
||||
_ui.topLabel->setText("If you don't have an ownCloud server yet, see <a href=\"https://owncloud.com\">owncloud.com</a> for more info.");
|
||||
} else {
|
||||
if( !variant.isNull() ) {
|
||||
setupCustomMedia( variant, _ui.topLabel );
|
||||
}
|
||||
|
||||
|
||||
@ -371,8 +371,6 @@ void StatusDialog::folderToModelItem( QStandardItem *item, Folder *f )
|
||||
{
|
||||
if( ! item || !f ) return;
|
||||
|
||||
QIcon icon = _theme->folderIcon( f->backend() );
|
||||
item->setData( icon, FolderViewDelegate::FolderStatusIconRole );
|
||||
item->setData( f->nativePath(), FolderViewDelegate::FolderPathRole );
|
||||
item->setData( f->secondPath(), FolderViewDelegate::FolderSecondPathRole );
|
||||
item->setData( f->alias(), FolderViewDelegate::FolderAliasRole );
|
||||
|
||||
@ -82,7 +82,8 @@ QString Theme::version() const
|
||||
|
||||
QIcon Theme::trayFolderIcon( const QString& backend ) const
|
||||
{
|
||||
return folderIcon( backend );
|
||||
Q_UNUSED(backend)
|
||||
return applicationIcon();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -70,11 +70,6 @@ public:
|
||||
*/
|
||||
virtual QString configFileName() const = 0;
|
||||
|
||||
/**
|
||||
* get a folder icon for a given backend in a given size.
|
||||
*/
|
||||
virtual QIcon folderIcon( const QString& ) const = 0;
|
||||
|
||||
/**
|
||||
* the icon that is shown in the tray context menu left of the folder name
|
||||
*/
|
||||
@ -86,7 +81,6 @@ public:
|
||||
virtual QIcon syncStateIcon( SyncResult::Status, bool sysTray = false ) const;
|
||||
|
||||
virtual QIcon folderDisabledIcon() const = 0;
|
||||
virtual QPixmap splashScreen() const = 0;
|
||||
|
||||
virtual QIcon applicationIcon() const = 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user