changeset 38:0ce56c4dd355

small ui enhancements
author drewp
date Sun, 07 Jul 2002 12:16:27 +0000
parents 115636cca107
children 2443de5df9c5
files light8/panels.py
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/light8/panels.py	Sun Jul 07 12:16:03 2002 +0000
+++ b/light8/panels.py	Sun Jul 07 12:16:27 2002 +0000
@@ -77,7 +77,7 @@
 
 class Subpanels:
     def __init__(self, scenesparent, effectsparent, scalelevels, Subs, xfader,
-        changelevel):
+        changelevel, subediting, longestname):
         
         sublist = Subs.subs.items()
         sublist.sort()
@@ -87,15 +87,17 @@
             if sub.is_effect:
                 parent=effectsparent
                 side1='bottom'
-                orient='vert'
+                orient1='vert'
                 end1=0
                 end2=1
+                width1=len(name)
             else:
                 parent=scenesparent
                 side1='right'
-                orient='horiz'
+                orient1='horiz'
                 end1=1
                 end2=0
+                width1=longestname
 
             # make frame that surrounds the whole submaster
             f=Frame(parent, bd=1, relief='raised')
@@ -115,10 +117,13 @@
                             showvalue=0, length=300-17,
                             width=18, sliderlength=18,
                             to=end1,res=.001,from_=end2,bd=0, font=stdfont,
-                            orient=orient,
-                            labelwidth=12, # this should be equal to the longest label name
+                            orient=orient1,
+                            labelwidth=width1,
                             **scaleopts)
 
+            eb = Button(f,text="E",font=stdfont,padx=0,pady=0,bd=1,command=lambda subediting=subediting,sub=sub: subediting.setsub(sub))
+            eb.pack(side=side1,fill='both',padx=0,pady=0)
+
             for axis in ('y','x'):
                 cvar=IntVar()
                 cb=Togglebutton(f,text=axis.upper(),variable=cvar,font=stdfont, padx=0,