diff options
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 21 | ||||
-rw-r--r-- | lumina-desktop/LSession.cpp | 3 |
2 files changed, 19 insertions, 5 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 86db3fc6..8040c18b 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -116,7 +116,7 @@ void LDesktop::SystemApplication(QAction* act){ void LDesktop::checkResolution(){ //Compare the current screen resolution with the last one used/saved and adjust config values *only* - + //NOTE: This is only run the first time this desktop is created (before loading all the interface) - not on each desktop change int oldWidth = settings->value(DPREFIX+"screen/lastWidth",-1).toInt(); int oldHeight = settings->value(DPREFIX+"screen/lastHeight",-1).toInt(); QRect scrn = LSession::desktop()->screenGeometry(desktopnumber); @@ -152,9 +152,22 @@ void LDesktop::checkResolution(){ } } //Update any desktop plugins - /*for(int i=0; i<PLUGINS.length(); i++){ - PLUGINS[i]->scalePlugin(xscale, yscale); - }*/ + QStringList plugs = settings->value(DPREFIX+"pluginlist").toStringList(); + QString pspath = QDir::homePath()+"/.lumina/desktop-plugins/%1.conf"; + for(int i=0; i<plugs.length(); i++){ + if(QFile::exists( pspath.arg(plugs[i]) )){ + //Has existing settings file - need to adjust this as well + QSettings pset(QSettings::UserScope, "desktop-plugins",plugs[i]); + if(pset.contains("location/height")){ pset.setValue( "location/height", qRound(pset.value("location/height").toInt()*yscale) ); } + if(pset.contains("location/width")){ pset.setValue( "location/width", qRound(pset.value("location/width").toInt()*xscale) ); } + if(pset.contains("location/x")){ pset.setValue( "location/x", qRound(pset.value("location/x").toInt()*xscale) ); } + if(pset.contains("location/y")){ pset.setValue( "location/y", qRound(pset.value("location/y").toInt()*yscale) ); } + if(pset.contains("IconSize")){ pset.setValue( "IconSize", qRound(pset.value("IconSize").toInt()*yscale) ); } + if(pset.contains("iconsize")){ pset.setValue( "iconsize", qRound(pset.value("iconsize").toInt()*yscale) ); } + pset.sync(); //make sure it gets saved to disk right away + } + } + } issyncing = false; } diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 5866b19d..342f509a 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -420,7 +420,8 @@ void LSession::updateDesktops(){ for(int i=0; i<DW->screenCount(); i++){ bool found = false; for(int j=0; j<DESKTOPS.length() && !found; j++){ - if(DESKTOPS[j]->Screen()==i){ found = true; } + //Match either the screen number or the screen location (preventing duplicates) + if(DESKTOPS[j]->Screen()==i || DW->screenGeometry(i)==DW->screenGeometry(DESKTOPS[j]->Screen()) ){ found = true; } } if(!found){ //Start the desktop on the new screen |