]> git.zerfleddert.de Git - micropolis/blobdiff - res/whead.tcl
correctly resize editor window to be in sync with the mini map
[micropolis] / res / whead.tcl
index f9b689e242ef93ac2052ec99af188521f76a7d2b..8de2802a18d46d5df1d85b8d3371154dd1fdb3cf 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