summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-01-06 22:24:54 +0800
committerBehdad Esfahbod <behdad@behdad.org>2014-01-06 22:24:54 +0800
commitf4137814279f7c5ef8dd4409e64a9f9574e2f681 (patch)
treea0db5d9c018991ea4a32f5638f2a475de3d2de99
parent0a6ce1cee7502c590bf22eac14a0f1b3d759532f (diff)
[glyphy] Set background to gradient
-rw-r--r--glyphy/glyphy_theme.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/glyphy/glyphy_theme.py b/glyphy/glyphy_theme.py
index 9318968..05a5fb9 100644
--- a/glyphy/glyphy_theme.py
+++ b/glyphy/glyphy_theme.py
@@ -62,7 +62,11 @@ def prepare_page (renderer):
p = padding * min (width, height)
p2 = 2 * p
- cr.set_source_rgb (0x13/255., 0x5f/255., 0xaa/255.)
+ cr.paint ()
+ sky = cairo.LinearGradient (0, 0, 0, height)
+ sky.add_color_stop_rgba (0, 0x13/255., 0x5f/255., 0xaa/255., 1.)
+ sky.add_color_stop_rgba (1, 0x85/255., 0x83/255., 0x6a/255., 1.)
+ cr.set_source (sky)
cr.paint ()
# Background image