summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-17 14:29:10 +0000
committerrubidium <rubidium@openttd.org>2009-10-17 14:29:10 +0000
commitd1d35b95b6e75a263b9395125af7d22faf02f462 (patch)
treedaed0a809413d71060da91af4c67175989222a2e /src/network
parent22ddb90fdbc45087064816ddb0cf0e0a27786db1 (diff)
downloadopenttd-d1d35b95b6e75a263b9395125af7d22faf02f462.tar.xz
(svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp2
-rw-r--r--src/network/network_gui.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 906796eb8..1a71964e6 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -692,7 +692,7 @@ public:
virtual void OnResize(Point delta)
{
- this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
+ this->vscroll.SetCapacity((this->widget[NCLWW_MATRIX].bottom - this->widget[NCLWW_MATRIX].top + 1) / this->resize.step_height);
this->widget[NCLWW_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
/* Make the matrix and details section grow both bigger (or smaller) */
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 085be44d8..85ee499b8 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -714,7 +714,7 @@ public:
virtual void OnResize(Point delta)
{
- this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
+ this->vscroll.SetCapacity((this->widget[NGWW_MATRIX].bottom - this->widget[NGWW_MATRIX].top + 1) / this->resize.step_height);
this->widget[NGWW_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
/* Additional colums in server list */