summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-12-22 20:53:28 +0000
committeralberth <alberth@openttd.org>2009-12-22 20:53:28 +0000
commitb30e56850cc77ef3de16e2bc721b7e704d1a12fb (patch)
tree8bc4301440d2ca490abdc59d54ca6c4b13e0e41b /src/window.cpp
parent3323d64f280cea84addc96d0018adaf93bb4e43b (diff)
downloadopenttd-b30e56850cc77ef3de16e2bc721b7e704d1a12fb.tar.xz
(svn r18607) -Fix (r18583): Preserve window width when shading.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 45484cf09..d35ec21ff 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -552,13 +552,13 @@ void Window::SetShaded(bool make_shaded)
{
if (this->shade_select == NULL) return;
- int desired = make_shaded ? SZSP_NONE : 0;
+ int desired = make_shaded ? SZSP_HORIZONTAL : 0;
if (this->shade_select->shown_plane != desired) {
if (make_shaded) {
this->unshaded_size.width = this->width;
this->unshaded_size.height = this->height;
this->shade_select->SetDisplayedPlane(desired);
- this->ReInit();
+ this->ReInit(0, -this->height);
} else {
this->shade_select->SetDisplayedPlane(desired);
int dx = ((int)this->unshaded_size.width > this->width) ? (int)this->unshaded_size.width - this->width : 0;