From d9c50468c3f5f5e430b4d490f14c3c35c226c81a Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 17 Dec 2008 04:12:05 +0000 Subject: adapt to non-XO resolution --- (limited to 'TamTamMini.activity/Mini/InstrumentPanel.py') 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 ) -- cgit v0.9.1