Commit 5331cac0 authored by Bruno Coudoin's avatar Bruno Coudoin

play_piano, fix string too large for button in some languages

parent 9d8d56e9
......@@ -1349,7 +1349,8 @@ def pianokeyBindings(keyval, keyboard_click):
# ---------------------------------------------------------------------------
class TextButton:
def __init__(self, x, y, text, rootitem, color_rgba=0x666666AAL):
def __init__(self, x, y, text, rootitem, color_rgba=0x666666AAL,
width=-1):
'''
Add a text button to the screen with the following parameters:
1. x: the x position of the button
......@@ -1360,7 +1361,6 @@ class TextButton:
TextButton(200, 300, 'Hello World!', self, color_rgba=0x6600FFFFL)
'''
width = -1
self.rootitem = goocanvas.Group(parent=rootitem, x=0, y=0)
textbox = goocanvas.Text(
parent = self.rootitem,
......
......@@ -121,7 +121,7 @@ dialogue to\nenable the sound."), None)
if level not in [6, 12]:
colorCodeNotesButton = TextButton(100, 215, _("Color code notes?"),
self.rootitem, 0x990011FFL)
self.rootitem, 0x990011FFL, 180)
colorCodeNotesButton.getBackground().connect("button_press_event",
self.color_code_notes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment