add KColorSchemeManager instance to install auto dark theme on Windows
This commit is contained in:
parent
596f648f6e
commit
82c7a8080d
7 changed files with 12 additions and 1 deletions
|
@ -7,7 +7,7 @@ add_executable(kdeconnect-app
|
|||
${kdeconnect_SRCS}
|
||||
${kdeconnect_custom_icons_SRCS}
|
||||
)
|
||||
target_link_libraries(kdeconnect-app Qt5::Quick Qt5::QuickControls2 Qt5::Widgets KF5::CoreAddons KF5::I18n)
|
||||
target_link_libraries(kdeconnect-app Qt5::Quick Qt5::QuickControls2 Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::KCMUtils)
|
||||
|
||||
install(TARGETS kdeconnect-app ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
#include <KLocalizedContext>
|
||||
#include <KColorSchemeManager>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
@ -25,6 +26,7 @@ int main(int argc, char* argv[])
|
|||
KAboutData::setApplicationData(aboutData);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
KColorSchemeManager manager;
|
||||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <KAboutData>
|
||||
#include <KCMultiDialog>
|
||||
#include <KLocalizedString>
|
||||
#include <KColorSchemeManager>
|
||||
|
||||
#include "interfaces/devicesmodel.h"
|
||||
#include "interfaces/dbusinterfaces.h"
|
||||
|
@ -45,6 +46,7 @@ int main(int argc, char** argv)
|
|||
about.setProgramLogo(QIcon(QStringLiteral(":/icons/kdeconnect/kdeconnect.svg")));
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
KColorSchemeManager manager;
|
||||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
IndicatorHelper helper(QUrl::fromLocalFile(qApp->applicationDirPath()));
|
||||
#else
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
#include <kcmutils_version.h>
|
||||
#include <KColorSchemeManager>
|
||||
|
||||
#include "ui_kcm.h"
|
||||
#include "dbusinterfaces.h"
|
||||
|
@ -44,6 +45,7 @@ KdeConnectKcm::KdeConnectKcm(QWidget* parent, const QVariantList& args)
|
|||
setAboutData(about);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
KColorSchemeManager manager;
|
||||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ target_link_libraries(kdeconnect-sms
|
|||
KF5::DBusAddons
|
||||
KF5::I18n
|
||||
KF5::People
|
||||
KF5::KCMUtils
|
||||
)
|
||||
|
||||
install(TARGETS kdeconnect-sms ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <KLocalizedString>
|
||||
#include <KLocalizedContext>
|
||||
#include <KDBusService>
|
||||
#include <KColorSchemeManager>
|
||||
|
||||
#include "smshelper.h"
|
||||
|
||||
|
@ -40,6 +41,7 @@ int main(int argc, char *argv[])
|
|||
KAboutData::setApplicationData(aboutData);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
KColorSchemeManager manager;
|
||||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <KLocalizedString>
|
||||
#include <KUrlRequester>
|
||||
#include <KDBusService>
|
||||
#include <KColorSchemeManager>
|
||||
|
||||
#include <dbushelper.h>
|
||||
|
||||
|
@ -50,6 +51,7 @@ int main(int argc, char** argv)
|
|||
KDBusService dbusService(KDBusService::Unique);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
KColorSchemeManager manager;
|
||||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue