Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TamTamMini.activity/Mini/InstrumentPanel.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2008-12-17 04:12:05 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2008-12-19 23:50:56 (GMT)
commitd9c50468c3f5f5e430b4d490f14c3c35c226c81a (patch)
treeb9c228f5e5663570a35b991d1c5a562b04416eb1 /TamTamMini.activity/Mini/InstrumentPanel.py
parent66545d820c297b27f945e839e470819733a46efc (diff)
adapt to non-XO resolution
Diffstat (limited to 'TamTamMini.activity/Mini/InstrumentPanel.py')
-rw-r--r--TamTamMini.activity/Mini/InstrumentPanel.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/TamTamMini.activity/Mini/InstrumentPanel.py b/TamTamMini.activity/Mini/InstrumentPanel.py
index 103c6f4..1b80347 100644
--- a/TamTamMini.activity/Mini/InstrumentPanel.py
+++ b/TamTamMini.activity/Mini/InstrumentPanel.py
@@ -10,6 +10,7 @@ import common.Config as Config
from common.Util.ThemeWidgets import *
from common.Util import InstrumentDB
+InstrumentSize = 110
Tooltips = Config.Tooltips
class InstrumentPanel( gtk.EventBox ):
@@ -31,13 +32,16 @@ class InstrumentPanel( gtk.EventBox ):
self.loadStage = [0,0,0]
if force_load: self.load()
- def configure( self, setInstrument = None, playInstrument = None, enterMode = False, micRec = None, synthRec = None, rowLen = 8 ):
+ def configure( self, setInstrument = None, playInstrument = None, enterMode = False, micRec = None, synthRec = None, rowLen = 8, width = -1 ):
self.setInstrument = setInstrument
self.playInstrument = playInstrument
self.enterMode = enterMode
self.micRec = micRec
+ if width != -1:
+ rowLen = width / InstrumentSize
+
if self.rowLen != rowLen:
self.rowLen = rowLen
self.prepareInstrumentTable( self.category )