correctly resize editor window to be in sync with the mini map
authorMichael Gernoth <michael@gernoth.net>
Mon, 14 Jan 2008 14:18:53 +0000 (15:18 +0100)
committerMichael Gernoth <michael@gernoth.net>
Mon, 14 Jan 2008 14:18:53 +0000 (15:18 +0100)
res/whead.tcl

index f9b689e..8de2802 100644 (file)
@@ -685,7 +685,16 @@ place configure $win.col2\
   -x [expr "$HeadPanelWidth + 5"]\
   -y 0\
   -relheight 1.0\
-  -relwidth 1.0
+  -width [expr "($screenwidth - $HeadPanelWidth) - 5"]
+
+proc resizeeditor {win width} {
+  global HeadPanelWidth
+
+  place configure $win.col2\
+    -width [expr "($width - $HeadPanelWidth) - 5"]
+}
+
+bind $win <Configure> "resizeeditor $win %w"
 
 #pack append $win.col2\
 #    $win.col2.x1              {top frame nw fillx} \
Impressum, Datenschutz