X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/blobdiff_plain/2b8964762fece215b12e606abfb75c325f93e27e..e20a2581da67104e8fb26ce5c4a8e620d9c1ca75:/res/whead.tcl diff --git a/res/whead.tcl b/res/whead.tcl index f9b689e..1255d5b 100644 --- a/res/whead.tcl +++ b/res/whead.tcl @@ -80,8 +80,17 @@ set visual [winfo screenvisual $win] set depth [winfo screendepth $win] set screenwidth [winfo screenwidth $win] set screenheight [winfo screenheight $win] -#set screenwidth 1200 -#set screenheight 900 +set initialwidth 1200 +set initialheight 900 + +if {$screenwidth < $initialwidth} { + set initialwidth $screenwidth +} + +if {$screenheight < $initialheight} { + set initialheight $screenheight +} + if {!(("$visual" == "pseudocolor") || ("$visual" == "truecolor") || @@ -116,7 +125,7 @@ bind $win {tk_traverseToMenu %W %A} wm title $win "Micropolis Controls" wm iconname $win {Micropolis Controls} -wm geometry $win 1200x900+0+0 +wm geometry $win ${initialwidth}x${initialheight}+0+0 #wm positionfrom $win user wm withdraw $win wm maxsize $win $screenwidth $screenheight @@ -656,7 +665,7 @@ place configure $win.col1\ -x 0\ -y 0\ -width $HeadPanelWidth\ - -height $screenheight + -relheight 1.0 pack append $win.col1\ $win.col1.w1 {top frame nw fillx} \ @@ -685,7 +694,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 "resizeeditor $win %w" #pack append $win.col2\ # $win.col2.x1 {top frame nw fillx} \