Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-07-15 15:38:20 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-07-15 15:38:20 (GMT)
commitcd87919086d4c15ab1dd6d00337d59a743925217 (patch)
tree512693bebf5983b5bd43671749be89b468d8da40
parenta6a231ebf99c5a1ab422c03846d850372c1fe921 (diff)
Make corner radius depend on card size
-rw-r--r--svgcard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/svgcard.py b/svgcard.py
index b7bbfe8..650f6f8 100644
--- a/svgcard.py
+++ b/svgcard.py
@@ -37,7 +37,6 @@ import model
_logger = logging.getLogger('memorize-activity')
-radio = style.zoom(60)
BORDER_WIDTH = style.zoom(10)
@@ -123,6 +122,7 @@ class SvgCard(Gtk.EventBox):
context.paint()
if highlighted:
+ radio = self.size / 3
self.draw_round_rect(context, 0, 0, self.size, self.size, radio)
context.set_source_rgb(1., 1., 1.)
context.set_line_width(BORDER_WIDTH)
@@ -142,6 +142,7 @@ class SvgCard(Gtk.EventBox):
icon_data = self.props['back']
cache_context.save()
+ radio = self.size / 3
self.draw_round_rect(cache_context, 0, 0, self.size, self.size,
radio)
r, g, b, a = icon_data['fill_color'].get_rgba()