aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libLumina/LuminaUtils.cpp24
-rw-r--r--lumina-desktop/defaults/luminaDesktop.conf6
2 files changed, 23 insertions, 7 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index fa6c64f8..fd65ce03 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -201,8 +201,13 @@ void LUtils::LoadSystemDefaults(bool skipOS){
//Find the number of the left-most desktop screen
QString screen = "0";
QDesktopWidget *desk =QApplication::desktop();
+ QRect screenGeom;
for(int i=0; i<desk->screenCount(); i++){
- if(desk->screenGeometry(i).x()==0){ screen = QString::number(i); break; }
+ if(desk->screenGeometry(i).x()==0){
+ screen = QString::number(i);
+ screenGeom = desk->screenGeometry(i);
+ break;
+ }
}
//Now setup the default "desktopsettings.conf" and "sessionsettings.conf" files
QStringList deskset, sesset;
@@ -244,7 +249,11 @@ void LUtils::LoadSystemDefaults(bool skipOS){
QString val = tmp[i].section("=",1,1).section("#",0,0).toLower().simplified();
QString istrue = (val=="true") ? "true": "false";
//Now parse the variable and put the value in the proper file
- if(var=="panel1.pixelsize"){ deskset << "height="+val; }
+ if(var=="panel1.pixelsize"){
+ if(val.endsWith("%H")){ val = QString::number( (screenGeom.height()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the height of the screen
+ else if(val.endsWith("%W")){ val = QString::number( (screenGeom.width()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the width of the screen
+ deskset << "height="+val;
+ }
else if(var=="panel1.autohide"){ deskset << "hidepanel="+istrue; }
else if(var=="panel1.location"){ deskset << "location="+val; }
else if(var=="panel1.plugins"){ deskset << "pluginlist="+val; }
@@ -259,7 +268,11 @@ void LUtils::LoadSystemDefaults(bool skipOS){
QString val = tmp[i].section("=",1,1).section("#",0,0).toLower().simplified();
QString istrue = (val=="true") ? "true": "false";
//Now parse the variable and put the value in the proper file
- if(var=="panel2.pixelsize"){ deskset << "height="+val; }
+ if(var=="panel2.pixelsize"){
+ if(val.endsWith("%H")){ val = QString::number( (screenGeom.height()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the height of the screen
+ else if(val.endsWith("%W")){ val = QString::number( (screenGeom.width()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the width of the screen
+ deskset << "height="+val;
+ }
else if(var=="panel2.autohide"){ deskset << "hidepanel="+istrue; }
else if(var=="panel2.location"){ deskset << "location="+val; }
else if(var=="panel2.plugins"){ deskset << "pluginlist="+val; }
@@ -290,7 +303,10 @@ void LUtils::LoadSystemDefaults(bool skipOS){
else if(var=="theme.colorfile"){ themesettings[1] = val; }
else if(var=="theme.iconset"){ themesettings[2] = val; }
else if(var=="theme.font"){ themesettings[3] = val; }
- else if(var=="theme.fontsize"){ themesettings[4] = val; }
+ else if(var=="theme.fontsize"){
+ if(val.endsWith("%")){ val = QString::number( (screenGeom.height()*val.section("%",0,0).toDouble())/100 )+"px"; }
+ themesettings[4] = val;
+ }
}
//Now double check that the custom theme/color files exist and reset it will the full path as necessary
if(setTheme){
diff --git a/lumina-desktop/defaults/luminaDesktop.conf b/lumina-desktop/defaults/luminaDesktop.conf
index f35f0654..fe3269ac 100644
--- a/lumina-desktop/defaults/luminaDesktop.conf
+++ b/lumina-desktop/defaults/luminaDesktop.conf
@@ -14,7 +14,7 @@
# terminal, filemanager, applications, line, settings, windowlist, app::<absolute path to *.desktop file>
#GENERAL SESSION SETTINGS
-session.enablenumlock=true #[true/false] Enable numlock on login using "numlockx"
+session.enablenumlock=false #[true/false] Enable numlock on login using "numlockx"
session.playloginaudio=true #[true/false] Play the audio chimes on log in
session.playlogoutaudio=true #[true/false] Play the audio chimes on log out
@@ -23,7 +23,7 @@ session.playlogoutaudio=true #[true/false] Play the audio chimes on log out
#theme.colorfile=<file path> #Absolute path to the color spec file to use for theming
theme.iconset=oxygen #Name of the icon theme to use
theme.font=Arial #Name of the font family to use
-theme.fontsize=10pt #Default size of the fonts to use on the desktop
+theme.fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (<number>%) )
#DESKTOP SETTINGS (used for the left-most screen in multi-screen setups)
desktop.visiblepanels=1 #[0/1/2] The number of panels visible by default
@@ -34,7 +34,7 @@ desktop.plugins=desktopview #list of plugins to be shown on the desktop by defau
#PANEL SETTINGS (preface with panel1.<setting> or panel2.<setting>, depending on the number of panels you have visible by default)
#NOTE: If two panels, they need to be on opposite screen edges (top/bottom or left/right)
panel1.location=top #[top/bottom/left/right] Screen edge the panel should be on
-panel1.pixelsize=30 #number of pixels wide/high the panel should be
+panel1.pixelsize=4%H #number of pixels wide/high the panel should be (or <number>%[W/H] for a percentage of the screen width/height)
panel1.autohide=false #[true/false] Have the panel become visible on mouse-over
panel1.plugins=userbutton, taskmanager, spacer, systemtray, clock, systemdashboard #list of plugins for the panel
bgstack15