diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-06-28 19:37:54 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-06-29 10:34:00 +0200 |
commit | 305ba1d5c4a571c10b7e0862a905c92e0db1831b (patch) | |
tree | b67d8185ee071ffd72271e441b8322ec8ef11722 /skins/larry/svggradient.php | |
parent | 3e5e66fabf40392430a1b42101bf42870d8d8ebc (diff) |
Better style for preview header toggle
Diffstat (limited to 'skins/larry/svggradient.php')
-rw-r--r-- | skins/larry/svggradient.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/skins/larry/svggradient.php b/skins/larry/svggradient.php index 25b2e9082..13f9ee289 100644 --- a/skins/larry/svggradient.php +++ b/skins/larry/svggradient.php @@ -20,6 +20,7 @@ header("Pragma: "); $svg_stops = ''; $color_stops = explode(';', preg_replace('/[^a-f0-9,;%]/i', '', $_GET['c'])); +$gradient_coords = !empty($_GET['h']) ? 'x1="0%" y1="0%" x2="100%" y2="0%"' : 'x1="0%" y1="0%" x2="0%" y2="100%"'; $last = count($color_stops) - 1; foreach ($color_stops as $i => $stop) { list($color, $offset) = explode(',', $stop); @@ -34,7 +35,7 @@ foreach ($color_stops as $i => $stop) { ?> <svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%"> <defs> - <linearGradient id="LG1" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad"> + <linearGradient id="LG1" <?php echo $gradient_coords; ?> spreadMethod="pad"> <?php echo $svg_stops; ?> </linearGradient> </defs> |