From 23914238d14aeb9eb08cab85f09a5c8cf4191078 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Oct 2010 23:16:51 +0000 Subject: [PATCH] * compiz-plugins-extra: Wrote a patch to add "centered maxpect" scaling mode for background images (as in KDE), i.e., scale the image to the maximum size while preserving its aspect ratio. svn path=/nixpkgs/trunk/; revision=24394 --- .../window-managers/compiz/plugins-extra.nix | 6 ++ .../compiz/wallpaper-maxpect.patch | 58 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch diff --git a/pkgs/applications/window-managers/compiz/plugins-extra.nix b/pkgs/applications/window-managers/compiz/plugins-extra.nix index 65a0be2da99..18b779d9b49 100644 --- a/pkgs/applications/window-managers/compiz/plugins-extra.nix +++ b/pkgs/applications/window-managers/compiz/plugins-extra.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { sha256 = "1qbxfi332bbadm0ah48frnrl9dkczl111s5a91a0cqz5v7nbw4g1"; }; + patches = + [ # Support scaling wallpapers to the maximum size while still + # respecting the aspect ratio. + ./wallpaper-maxpect.patch + ]; + NIX_CFLAGS_COMPILE = "-I${compiz_plugins_main}/include/compiz"; buildInputs = diff --git a/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch b/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch new file mode 100644 index 00000000000..8130dff1dba --- /dev/null +++ b/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch @@ -0,0 +1,58 @@ +diff -x '*~' -ru compiz-plugins-extra-0.8.6-orig/metadata/wallpaper.xml.in compiz-plugins-extra-0.8.6/metadata/wallpaper.xml.in +--- compiz-plugins-extra-0.8.6-orig/metadata/wallpaper.xml.in 2010-03-29 16:09:17.000000000 +0200 ++++ compiz-plugins-extra-0.8.6/metadata/wallpaper.xml.in 2010-10-21 00:23:18.000000000 +0200 +@@ -24,7 +24,7 @@ + <_long>Image position. + int + 0 +- 4 ++ 5 + + 0 + <_name>Scale and Crop +@@ -45,6 +45,10 @@ + 4 + <_name>Center Tiled + ++ ++ 5 ++ <_name>Centered Maxpect ++ + +