From 6fa8547948f4f5c46552f5d61a999e1943e20391 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 18 Dec 2010 01:51:51 +0100 Subject: [PATCH] show less event history on small screens --- res/micropolis.tcl | 2 ++ res/whead.tcl | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/res/micropolis.tcl b/res/micropolis.tcl index a7a5de5..8c4c36a 100644 --- a/res/micropolis.tcl +++ b/res/micropolis.tcl @@ -262,6 +262,7 @@ set ScenarioDescY 170 set ScenarioDescWidth 280 set ScenarioDescHeight 285 set ScenarioDescFont Large +set EventLines 5 set screenwidth [winfo screenwidth .] set screenheight [winfo screenheight .] @@ -284,6 +285,7 @@ if {($screenwidth < $ScenarioPanelWidth) || set ScenarioDescHeight 210 set ScenarioDescFont Tiny set ScenarioButtons $ScenarioButtons600x450 + set EventLines 2 } # Disabled until we handle mouse events on the map itself. diff --git a/res/whead.tcl b/res/whead.tcl index 5432324..2f568f1 100644 --- a/res/whead.tcl +++ b/res/whead.tcl @@ -544,13 +544,15 @@ scrollbar $win.col1.w1.f2.f2.scroll\ SetHelp $win.col1.w1.f2.f2.scroll Head.Scrollbar +global EventLines + text $win.col1.w1.f2.f2.text \ -yscroll "$win.col1.w1.f2.f2.scroll set" \ -borderwidth 1 \ -relief sunken \ -wrap word \ -state disabled \ - -height 5 \ + -height $EventLines \ -font [Font $win Text] LinkWindow $win.text $win.col1.w1.f2.f2.text -- 2.39.5