[gcompris] play rhythm, uses the same icons as composition.



commit 9c45efffd02d5885d2cdb48cbe6fe7ab06753560
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Oct 1 23:45:32 2012 +0200

    play rhythm, uses the same icons as composition.
    
    Removed specific icons to reuse the one from piano composition
    and improved the screen layout.

 src/play_rhythm-activity/play_rhythm.py |   42 ++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 15 deletions(-)
---
diff --git a/src/play_rhythm-activity/play_rhythm.py b/src/play_rhythm-activity/play_rhythm.py
index 5ccd9c2..2767911 100644
--- a/src/play_rhythm-activity/play_rhythm.py
+++ b/src/play_rhythm-activity/play_rhythm.py
@@ -143,19 +143,42 @@ dialogue to\nenable the sound."), None)
         self.metronomeButton.connect("button_press_event", self.play_metronome)
         gcompris.utils.item_focus_init(self.metronomeButton, None)
 
+        bx = 650
+        by = 230
+
+        goocanvas.Rect(parent = self.rootitem,
+                       x = bx - 10,
+                       y = by - 8,
+                       width = 120,
+                       height = 63,
+                       stroke_color = "black",
+                       fill_color_rgba = 0x33333399L,
+                       line_width = 2.0,
+                       radius_x = 3, radius_y = 3)
         # PLAY BUTTON
         self.playButton = goocanvas.Image(
                 parent=self.rootitem,
-                pixbuf=gcompris.utils.load_pixmap('piano_composition/playActivities/playbutton.png'),
-                x=170,
-                y=50,
-                tooltip = "\n\n\n" + _('Play')
+                pixbuf = gcompris.utils.load_pixmap('piano_composition/play.svg'),
+                x = bx,
+                y = by,
+                tooltip = "\n\n" + _('Play')
                 )
         self.playButton.connect("button_press_event", self.staff.playComposition)
         self.playButton.connect("button_press_event", self.stopMetronome)
 
         gcompris.utils.item_focus_init(self.playButton, None)
 
+        # ERASE BUTTON
+        self.eraseButton = goocanvas.Image(
+                parent=self.rootitem,
+                pixbuf = gcompris.utils.load_pixmap('piano_composition/edit-clear.svg'),
+                x = bx + 50,
+                y = by,
+                tooltip = "\n\n" + _("Erase Attempt")
+                )
+        self.eraseButton.connect("button_press_event", self.erase_entry)
+        gcompris.utils.item_focus_init(self.eraseButton, None)
+
         # OK BUTTON
         self.okButton = goocanvas.Svg(parent=self.rootitem,
                                       svg_handle=gcompris.skin.svg_get(),
@@ -168,17 +191,6 @@ dialogue to\nenable the sound."), None)
         self.okButton.connect("button_press_event", self.stopMetronome)
 
 
-        # ERASE BUTTON
-        self.eraseButton = goocanvas.Image(
-                parent=self.rootitem,
-                pixbuf=gcompris.utils.load_pixmap('piano_composition/playActivities/erase.png'),
-                x=650,
-                y=170,
-                tooltip = "\n\n\n" + _("Erase Attempt")
-                )
-        self.eraseButton.connect("button_press_event", self.erase_entry)
-        gcompris.utils.item_focus_init(self.eraseButton, None)
-
         self.metronomePlaying = False
 
         if level in [1, 3, 5, 7, 9, 11]:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]