From 9918437a71701e99dd481d0ef975dce2be0fd8cc Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 2 Mar 2011 17:01:45 +0100 Subject: [PATCH 1/3] play with the idea of painting an overlay pixmap on top of window background. --- clients/oxygen/oxygenfactory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/oxygen/oxygenfactory.cpp b/clients/oxygen/oxygenfactory.cpp index 7dd91cace1..22f10b09a1 100644 --- a/clients/oxygen/oxygenfactory.cpp +++ b/clients/oxygen/oxygenfactory.cpp @@ -52,6 +52,12 @@ namespace Oxygen { readConfig(); setInitialized( true ); + + // background pixmap + QPixmap pixmap; + pixmap.load( "/home/hpereira/Pictures/Wallpapers/window.ornate.png" ); + helper().setBackgroundPixmap( pixmap ); + } //___________________________________________________ From 96c7dedacb8c41e3be301ac9db1091d45a1a6238 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Thu, 3 Mar 2011 10:35:56 +0100 Subject: [PATCH 2/3] Added background pixmap offset to properly align decoration background and style background. --- clients/oxygen/oxygenfactory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clients/oxygen/oxygenfactory.cpp b/clients/oxygen/oxygenfactory.cpp index 22f10b09a1..47ec4f8923 100644 --- a/clients/oxygen/oxygenfactory.cpp +++ b/clients/oxygen/oxygenfactory.cpp @@ -138,6 +138,8 @@ namespace Oxygen // read shadowCache configuration changed |= shadowCache().readConfig( config ); + if( changed ) + { helper().setBackgroundPixmapOffset( QPoint( shadowCache().shadowSize(), 0 ) ); } return changed; From e5956f2e9adc30e71dcede0ec941663f62ec900f Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Thu, 3 Mar 2011 10:52:35 +0100 Subject: [PATCH 3/3] Decoration: read background pixmap from oxygenrc --- clients/oxygen/oxygenfactory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/oxygen/oxygenfactory.cpp b/clients/oxygen/oxygenfactory.cpp index 47ec4f8923..6a9d213a0f 100644 --- a/clients/oxygen/oxygenfactory.cpp +++ b/clients/oxygen/oxygenfactory.cpp @@ -52,12 +52,6 @@ namespace Oxygen { readConfig(); setInitialized( true ); - - // background pixmap - QPixmap pixmap; - pixmap.load( "/home/hpereira/Pictures/Wallpapers/window.ornate.png" ); - helper().setBackgroundPixmap( pixmap ); - } //___________________________________________________ @@ -141,6 +135,12 @@ namespace Oxygen if( changed ) { helper().setBackgroundPixmapOffset( QPoint( shadowCache().shadowSize(), 0 ) ); } + // background pixmap + { + KConfigGroup group( config.group("Common") ); + helper().setBackgroundPixmap( group.readEntry( "BackgroundPixmap", "" ) ); + } + return changed; }