changeset 18111:da7340889664 draft

(svn r22932) -Fix [FS#4766]: disable the white border on window creation for several windows (based on patch by monoid)
author yexo <yexo@openttd.org>
date Thu, 15 Sep 2011 13:26:27 +0000
parents 87850d906b13
children 77c8f5f4884a
files src/highscore_gui.cpp src/main_gui.cpp src/misc_gui.cpp src/network/network_gui.cpp src/statusbar_gui.cpp src/widgets/dropdown.cpp
diffstat 6 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -34,6 +34,7 @@
 	EndGameHighScoreBaseWindow(const WindowDesc *desc) : Window()
 	{
 		this->InitNested(desc);
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 		ResizeWindow(this, _screen.width - this->width, _screen.height - this->height);
 	}
 
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -244,6 +244,7 @@
 	MainWindow() : Window()
 	{
 		this->InitNested(&_main_window_desc, 0);
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 		ResizeWindow(this, _screen.width, _screen.height);
 
 		NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(MW_VIEWPORT);
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -902,7 +902,7 @@
 
 		this->InitNested(&_tool_tips_desc);
 
-		this->flags4 &= ~WF_WHITE_BORDER_MASK; // remove white-border from tooltip
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK); // remove white-border from tooltip
 	}
 
 	virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1801,8 +1801,8 @@
 			this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban);
 		}
 
-		this->flags4 &= ~WF_WHITE_BORDER_MASK;
 		this->InitNested(desc, client_id);
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 	}
 
 	virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
--- a/src/statusbar_gui.cpp
+++ b/src/statusbar_gui.cpp
@@ -89,11 +89,11 @@
 
 	StatusBarWindow(const WindowDesc *desc) : Window()
 	{
-		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 		this->ticker_scroll    =   TICKER_STOP;
 		this->reminder_timeout = REMINDER_STOP;
 
 		this->InitNested(desc);
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 		PositionStatusbar(this);
 	}
 
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -148,7 +148,7 @@
 		this->GetWidget<NWidgetStacked>(DDM_SHOW_SCROLL)->SetDisplayedPlane(scroll ? 0 : SZSP_NONE);
 
 		this->FinishInitNested(&_dropdown_desc, 0);
-		this->flags4 &= ~WF_WHITE_BORDER_MASK;
+		CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
 
 		/* Total length of list */
 		int list_height = 0;