aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-desktop/LDesktop.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index cc3e8ed5..b9491d72 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -721,12 +721,15 @@ void LDesktop::UpdateBackground(){
if( (bgFile.toLower()=="default")){ bgFile = LOS::LuminaShare()+"desktop-background.jpg"; }
//Now set this file as the current background
QString style;
- if(bgFile.startsWith("rgb(")){
- //qDebug() << "Set background color:" << bgFile;
- style = "QWidget#bgWindow{ border-image: none; background-color: %1;}";
- }else{
- style = "QWidget#bgWindow{ background-color: black; border-image:url(%1) stretch;}";
- }
+ QString format = settings->value(DPREFIX+"background/format","stretch").toString();
+ if(bgFile.startsWith("rgb(")){ style = "QWidget#bgWindow{ border-image: none; background-color: %1;}";
+ }else if( format == "center"){ style = "QWidget#bgWindow{ background: black url(%1); background-position: center; background-repeat: no-repeat; }";
+ }else if( format == "topleft"){ style = "QWidget#bgWindow{ background: black url(%1); background-position: top left; background-repeat: no-repeat; }";
+ }else if( format == "topright"){ style = "QWidget#bgWindow{ background: black url(%1); background-position: top right; background-repeat: no-repeat; }";
+ }else if( format == "bottomleft"){ style = "QWidget#bgWindow{ background: black url(%1); background-position: bottom left; background-repeat: no-repeat; }";
+ }else if( format == "bottomright"){ style = "QWidget#bgWindow{ background: black url(%1); background-position: bottom right; background-repeat: no-repeat; }";
+ }else if( format == "tile"){ style = "QWidget#bgWindow{ background-color: black; border-image:url(%1) repeat;}";
+ }else{ /* STRETCH*/ style = "QWidget#bgWindow{ background-color: black; border-image:url(%1) stretch;}"; }
style = style.arg(bgFile);
bgWindow->setStyleSheet(style);
bgWindow->show();
bgstack15