diff options
Diffstat (limited to 'TamTamMini.activity/Mini/InstrumentPanel.py')
-rw-r--r-- | TamTamMini.activity/Mini/InstrumentPanel.py | 6 |
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 ) |