aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r--src-qt5/core/libLumina/ExternalProcess.h4
-rw-r--r--src-qt5/core/libLumina/LDesktopUtils.cpp34
2 files changed, 36 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h
index b1e56af8..ce8ff6f5 100644
--- a/src-qt5/core/libLumina/ExternalProcess.h
+++ b/src-qt5/core/libLumina/ExternalProcess.h
@@ -31,7 +31,7 @@ private slots:
void processStarting(){
if(!cursorRestored){
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
- QTimer::singleShot(15000, this, SLOT(resetCursor()) );
+ QTimer::singleShot(3000, this, SLOT(resetCursor()) );
}
}
void processFinished(){
@@ -62,7 +62,7 @@ public:
}*/
}
- static void launch(QString program, QStringList args = QStringList(), bool manageCursors = false){
+ static void launch(QString program, QStringList args = QStringList(), bool manageCursors = true){
//Quick launch of a process with logging disabled and automatic cleanup
ExternalProcess *tmp = new ExternalProcess("", manageCursors);
if(args.isEmpty()){ tmp->start(program); }
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp
index c65f6faf..db913e1b 100644
--- a/src-qt5/core/libLumina/LDesktopUtils.cpp
+++ b/src-qt5/core/libLumina/LDesktopUtils.cpp
@@ -505,6 +505,40 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){
}
LUtils::writeFile(dset, DS, true);
}
+ if(oldversion<1003004){
+ //Lumina 1.3.4 - Migrate theme settings from old format to the new theme engine format
+ QString themefile = QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/lthemeengine.conf";
+ if(!QFile::exists(themefile)){
+ //Need to migrate theme settings from the old location to the new one
+ QSettings newtheme(themefile);
+ QStringList oldtheme = LUtils::readFile( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg" );
+ //Find the system install location for the theme engine for use later
+ QString enginedir = LOS::LuminaShare()+"/../lthemeengine/";
+ //Find/match the icon theme
+ QString tmp = oldtheme.filter("ICONTHEME=").join("\n").section("=",1,-1).section("\n",0,0).simplified();
+ if(tmp.isEmpty()){ tmp = "material-design-light"; } //unknown Icon theme - use the default "light" version
+ newtheme.setValue("Appearance/icon_theme",tmp);
+ //Quick detect/adjust of the tone of the color theme based on the icons/colors (no 1-to-1 color theme matching between systems)
+ bool isdarktheme = tmp.contains("dark");
+ isdarktheme = isdarktheme || oldtheme.filter("COLORFILE=").join("\n").section("=",1,-1).section("\n",0,0).contains("DarkGlass");
+ //Quick adjust for the material-design icon theme to make it match the current dark/light theme
+ if(tmp.contains("material-design")){
+ newtheme.setValue("Appearance/icon_theme", QString("material-design-")+ (isdarktheme ? "dark" : "light") );
+ }
+ if(isdarktheme){
+ newtheme.setValue("Appearance/custom_palette", true);
+ newtheme.setValue("Appearance/color_scheme_path", enginedir+"colors/darker.conf");
+ newtheme.setValue("Interface/desktop_stylesheets", QStringList() << enginedir+"desktop_qss/DarkGlass.qss");
+ }else{
+ newtheme.setValue("Appearance/custom_palette", true);
+ newtheme.setValue("Appearance/color_scheme_path", enginedir+"colors/airy.conf");
+ newtheme.setValue("Interface/desktop_stylesheets", QStringList() << enginedir+"desktop_qss/Glass.qss");
+ }
+ newtheme.setValue("Appearance/style", "Fusion");
+ newtheme.setValue("Interface/stylesheets", QStringList() << enginedir+"qss/tooltip-simple.qss" << enginedir+"qss/scrollbar-simple.qss" << enginedir+"qss/sliders-simple.qss");
+ newtheme.sync(); //flush this to file right now
+ } //end check for theme file existance
+ }
//Check the fluxbox configuration files
dset = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/";
bgstack15