Commit 00ff22d6 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Use breeze dark color theme on first start if available and default theme is breeze

CCBUG: 346608
parent 09d14df4
......@@ -22,6 +22,7 @@
#include "utils/KoIconUtils.h"
#include "kdenlivesettings.h"
#include "renderer.h"
#include "utils/thememanager.h"
#ifdef USE_V4L
#include "capture/v4lcapture.h"
#endif
......@@ -72,7 +73,9 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
QWizard(parent),
m_systemCheckIsOk(false),
m_brokenModule(false)
{
{
// Check color theme
ThemeManager::instance()->initDarkTheme();
setWindowTitle(i18n("Welcome to Kdenlive"));
int logoHeight = fontMetrics().height() * 2.5;
setWizardStyle(QWizard::ModernStyle);
......
......@@ -48,7 +48,7 @@
#include <KColorScheme>
#include <ktoolinvocation.h>
#include "thememanager.h"
#include "kdenlivesettings.h"
class ThemeManagerCreator
{
......@@ -296,3 +296,15 @@ void ThemeManager::slotSettingsChanged()
slotChangePalette();
}
void ThemeManager::initDarkTheme()
{
QString defaultTheme = currentKDEdefaultTheme();
if (defaultTheme.isEmpty() || defaultTheme == QLatin1String("Breeze")) {
// Switch to breeze dark if available
if (d->themeMap.contains(QStringLiteral("Breeze Dark"))) {
KdenliveSettings::setColortheme(d->themeMap.value(QStringLiteral("Breeze Dark")));
setCurrentTheme(KdenliveSettings::colortheme());
slotChangePalette();
}
}
}
......@@ -52,16 +52,18 @@ public:
static ThemeManager* instance();
QString currentThemeName() const;
void setCurrentTheme(const QString& name);
void setCurrentTheme(const QString& name);
QString defaultThemeName() const;
void setThemeMenuAction(KActionMenu* const action);
void setThemeMenuAction(KActionMenu* const action);
/** @brief set dark theme by default if available */
void initDarkTheme();
Q_SIGNALS:
void signalThemeChanged(const QString&);
public Q_SLOTS:
void slotSettingsChanged();
void slotChangePalette();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment