...
 
Commits (4)
data/icons/kdenlive.ico

300 KB | W: | H:

data/icons/kdenlive.ico

101 KB | W: | H:

data/icons/kdenlive.ico
data/icons/kdenlive.ico
data/icons/kdenlive.ico
data/icons/kdenlive.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -42,6 +42,7 @@
#include "kdenlive_debug.h"
#include <KDBusService>
#include <KIconTheme>
#include <QResource>
#include <QApplication>
#include <QCommandLineOption>
#include <QCommandLineParser>
......@@ -98,6 +99,25 @@ int main(int argc, char *argv[])
KConfigGroup cg(config, "UiSettings");
cg.writeEntry("ColorScheme", "Breeze Dark");
}
#ifdef Q_OS_WIN
const QStringList themes {"/icons/breeze/breeze-icons.rcc", "/icons/breeze-dark/breeze-icons-dark.rcc"};
for(const QString theme : themes ) {
const QString themePath = QStandardPaths::locate(QStandardPaths::AppDataLocation, theme);
if (!themePath.isEmpty()) {
const QString iconSubdir = theme.left(theme.lastIndexOf('/'));
if (QResource::registerResource(themePath, iconSubdir)) {
if (QFileInfo::exists(QLatin1Char(':') + iconSubdir + QStringLiteral("/index.theme"))) {
qDebug() << "Loaded icon theme:" << theme;
} else {
qWarning() << "No index.theme found in" << theme;
QResource::unregisterResource(themePath, iconSubdir);
}
} else {
qWarning() << "Invalid rcc file" << theme;
}
}
}
#endif
// Init DBus services
KDBusService programDBusService;
......
......@@ -640,11 +640,10 @@ void MainWindow::slotThemeChanged(const QString &name)
KdenliveSettings::setUse_dark_breeze(useDarkIcons);
}
#if KXMLGUI_VERSION_MINOR < 23 && KXMLGUI_VERSION_MAJOR == 5
#if (KXMLGUI_VERSION < QT_VERSION_CHECK(5, 23, 0)) || defined(Q_OS_WIN)
// Not required anymore with auto colored icons since KF5 5.23
QColor background = plt.window().color();
bool useDarkIcons = background.value() < 100;
if (m_themeInitialized && useDarkIcons != m_isDarkTheme) {
QIcon::setThemeName(useDarkIcons ? QStringLiteral("breeze-dark") : QStringLiteral("breeze"));
if (pCore->bin()) {
pCore->bin()->refreshIcons();
}
......
......@@ -377,8 +377,8 @@ QString SlideshowClip::selectedPath(const QUrl &url, bool isMime, QString extens
QString folder;
if (isMime) {
folder = url.toLocalFile();
if (!folder.endsWith(QDir::separator())) {
folder.append(QDir::separator());
if (!folder.endsWith(QLatin1Char('/'))) {
folder.append(QLatin1Char('/'));
}
// Check how many files we have
QDir dir(folder);
......