make themes work better

This commit is contained in:
Malte Jürgens
2023-02-18 15:23:14 +01:00
parent 30c0526ff7
commit b39e23d462
6 changed files with 70 additions and 30 deletions

View File

@@ -4,6 +4,9 @@
#include <QApplication>
#include <QDebug>
#include <QFile>
#include <QInputDialog>
#include <QStandardPaths>
#include <QTimer>
#ifdef KXMLGUI
@@ -163,3 +166,14 @@ void UserScript::showStreamDialog() {
m_streamDialog->activateWindow();
m_streamDialog->updateTargets();
}
void UserScript::showThemeDialog() {
auto url = QInputDialog::getText(MainWindow::instance(), "Theme Installation",
"Please enter the URL of the Theme");
if (url != "")
emit shouldInstallUserStyles(url);
}
void UserScript::installUserStyles(QString url) {
emit shouldInstallUserStyles(url);
}