Changeset - e14a646853b1
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 17 years ago 2008-06-10 05:01:35
drewp@bigasterisk.com
subcomposer font tweak, as usual
1 file changed with 2 insertions and 13 deletions:
0 comments (0 inline, 0 general)
light9/dmxchanedit.py
Show inline comments
 
@@ -3,26 +3,17 @@
 
widget to show all dmx channel levels and allow editing. levels might
 
not actually match what dmxserver is outputting.
 

	
 
"""
 
from __future__ import nested_scopes,division
 
import Tkinter as tk
 
import time
 
from light9 import Patch
 
from light9.uihelpers import make_frame, colorlabel, eventtoparent
 
try:
 
     from dispatch import dispatcher
 
except ImportError:
 
     import louie as dispatcher
 
import louie as dispatcher
 

	
 
# this font makes each label take 16ms to create, so startup is slow.
 
# with default font, each labl takes about .5ms to create.
 
stdfont = ('Arial', 12)
 
import tkFont
 
# see replacement stdfont below
 

	
 
stdfont = ('Arial', 9)
 

	
 
def gradient(lev, low=(80,80,180), high=(255,55,50)):
 
     out = [int(l+lev*(h-l)) for h,l in zip(high,low)]
 
     col="#%02X%02X%02X" % tuple(out)
 
     return col
 

	
 
@@ -127,14 +118,12 @@ class Onelevel(tk.Frame):
 

	
 
        dispatcher.send("levelchanged",channel=self.channelnum,newlevel=newlev)
 
    
 
class Levelbox(tk.Frame):
 
    def __init__(self, parent, num_channels=68):
 
        tk.Frame.__init__(self,parent)
 
        global stdfont
 
        stdfont = tkFont.Font(size=8)
 
        self.levels = [] # Onelevel objects
 

	
 
        rows = 35
 
        frames = [make_frame(self) for x in range((num_channels // rows) + 1)]
 

	
 
        for channel in range(1, num_channels+1):
0 comments (0 inline, 0 general)