aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-09-13 13:11:52 -0400
committerKen Moore <ken@ixsystems.com>2017-09-13 13:11:52 -0400
commit94b2980985d668172a6760ea3e6855be36cce336 (patch)
tree1f5f70657605f56f5bf583501518706628ecbb4e
parenttesting FastTransformation for thumbnail generation in fm-dev (diff)
downloadlumina-94b2980985d668172a6760ea3e6855be36cce336.tar.gz
lumina-94b2980985d668172a6760ea3e6855be36cce336.tar.bz2
lumina-94b2980985d668172a6760ea3e6855be36cce336.zip
Fix up some of the qss theme page
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp
index 681de6c9..2e906d9e 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp
@@ -4,6 +4,8 @@
#include <QMessageBox>
#include <QFile>
#include <QMenu>
+#include <QDebug>
+
#include "lthemeengine.h"
#include "qsseditordialog.h"
#include "qsspage.h"
@@ -44,6 +46,7 @@ void QSSPage::writeSettings(){
}
void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *){
+ //qDebug() << "Got Current Item Changed";
if(current){
m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool());
m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool());
@@ -67,6 +70,12 @@ void QSSPage::on_createButton_clicked(){
QMessageBox::warning(this, tr("Error"), tr("The file \"%1\" already exists").arg(filePath));
return;
}
+ // Make sure the directory exists
+ QString dir = filePath.section("/",0,-2);
+ if(!QFile::exists(dir)){
+ QDir D(dir);
+ D.mkpath(dir);
+ }
//creating empty file
QFile file(filePath);
file.open(QIODevice::WriteOnly);
@@ -99,7 +108,7 @@ void QSSPage::on_removeButton_clicked(){
void QSSPage::readSettings(){
//load stylesheets
m_ui->qssListWidget->clear();
- if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); }
+ if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userDesktopStyleSheetPath() << lthemeengine::sharedDesktopStyleSheetPath()); }
else{findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); }
QSettings settings(lthemeengine::configFile(), QSettings::IniFormat);
QStringList styleSheets;
bgstack15