diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-07-11 18:41:03 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-07-14 11:00:10 (GMT) |
commit | 222c2e0873b03736df1528f9f4960125e500e641 (patch) | |
tree | d4a4c6142443247586ce698802901361ddbf9b4d | |
parent | 4791831c6fe9615a9d6d6f9cf44824cdc6e8b4b9 (diff) |
Remove unused align parameter in SvgCard
-rw-r--r-- | cardlist.py | 4 | ||||
-rw-r--r-- | cardtable.py | 3 | ||||
-rw-r--r-- | createcardpanel.py | 2 | ||||
-rw-r--r-- | svgcard.py | 9 |
4 files changed, 5 insertions, 13 deletions
diff --git a/cardlist.py b/cardlist.py index 216402e..4825cc5 100644 --- a/cardlist.py +++ b/cardlist.py @@ -287,7 +287,7 @@ class CardPair(Gtk.EventBox): 'text_color': style.Color('#ffffff')}, 'front': {'fill_color': style.Color('#4c4d4f'), 'stroke_color': style.Color('#ffffff')}}, - None, theme.PAIR_SIZE, 1, self.bg_color, font_name1) + None, theme.PAIR_SIZE, self.bg_color, font_name1) self.bcard1.flip() self.bcard1.set_pixbuf(aimg) align = Gtk.Alignment.new(.5, .5, 0, 0) @@ -300,7 +300,7 @@ class CardPair(Gtk.EventBox): 'text_color': style.Color('#ffffff')}, 'front': {'fill_color': style.Color('#4c4d4f'), 'stroke_color': style.Color('#ffffff')}}, - None, theme.PAIR_SIZE, 1, self.bg_color, font_name2) + None, theme.PAIR_SIZE, self.bg_color, font_name2) self.bcard2.flip() self.bcard2.set_pixbuf(bimg) align = Gtk.Alignment.new(.5, .5, 0, 0) diff --git a/cardtable.py b/cardtable.py index 25e8ab6..2963edb 100644 --- a/cardtable.py +++ b/cardtable.py @@ -148,10 +148,9 @@ class CardTable(Gtk.EventBox): props['back_text'] = {'card_text': text2} font_name = font_name2 - align = self.data.get('align', '1') card = svgcard.SvgCard( identifier, props, jpg, - self.card_size, align, '#000000', font_name) + self.card_size, '#000000', font_name) card.connect('enter-notify-event', self.mouse_event, [x, y]) card.set_events(Gdk.EventMask.TOUCH_MASK | Gdk.EventMask.BUTTON_PRESS_MASK) diff --git a/createcardpanel.py b/createcardpanel.py index 5cccc5d..a4e27a1 100644 --- a/createcardpanel.py +++ b/createcardpanel.py @@ -300,7 +300,7 @@ class CardEditor(Gtk.EventBox): self.card = svgcard.SvgCard( -1, {'front_text': {'card_text': '', 'text_color': style.Color('#ffffff')}}, - None, theme.PAIR_SIZE, 1, '#c0c0c0') + None, theme.PAIR_SIZE, '#c0c0c0') self.card.flip() card_align = Gtk.Alignment.new(.5, .5, 0, 0) card_align.add(self.card) @@ -59,7 +59,7 @@ class SvgCard(Gtk.EventBox): default_props['front_text'] = {'text_color': '#ffffff'} def __init__(self, identifier, pprops, jpeg, size, - align, bg_color='#000000', font_name=model.DEFAULT_FONT): + bg_color='#000000', font_name=model.DEFAULT_FONT): Gtk.EventBox.__init__(self) self.bg_color = bg_color @@ -76,7 +76,6 @@ class SvgCard(Gtk.EventBox): self._on_animation = False self._animation_step = 0 - self.align = align self.text_layouts = [None, None] self.font_name = font_name self._highlighted = False @@ -178,12 +177,6 @@ class SvgCard(Gtk.EventBox): width, height = layout.get_pixel_size() y = (self.size - height) / 2 - if flipped: - if self.align == '2': # top - y = 0 - elif self.align == '3': # bottom - y = self.size - height - x = (self.size - width) / 2 cache_context.set_source_rgb(1, 1, 1) cache_context.translate(x, y) |