Changeset - r20509:bd425c7496bd
[Not reviewed]
master
0 4 0
frosch - 11 years ago 2013-06-30 14:33:32
frosch@openttd.org
(svn r25533) -Codechange: Use SetCapacityFromWidget more often.
4 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_gui.cpp
Show inline comments
 
@@ -211,7 +211,7 @@ struct AIListWindow : public Window {
 
	virtual void OnResize()
 
	{
 
		NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_AIL_LIST);
 
		this->vscroll->SetCapacity(nwi->current_y / this->line_height);
 
		this->vscroll->SetCapacityFromWidget(this, WID_AIL_LIST);
 
		nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
 
	}
 

	
 
@@ -562,7 +562,7 @@ struct AISettingsWindow : public Window 
 
	virtual void OnResize()
 
	{
 
		NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_AIS_BACKGROUND);
 
		this->vscroll->SetCapacity(nwi->current_y / this->line_height);
 
		this->vscroll->SetCapacityFromWidget(this, WID_AIS_BACKGROUND);
 
		nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
 
	}
 

	
src/group_gui.cpp
Show inline comments
 
@@ -680,7 +680,7 @@ public:
 
	virtual void OnResize()
 
	{
 
		NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_GL_LIST_GROUP);
 
		this->group_sb->SetCapacity(nwi->current_y / this->tiny_step_height);
 
		this->group_sb->SetCapacityFromWidget(this, WID_GL_LIST_GROUP);
 
		nwi->widget_data = (this->group_sb->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
 

	
 
		nwi = this->GetWidget<NWidgetCore>(WID_GL_LIST_VEHICLE);
src/newgrf_gui.cpp
Show inline comments
 
@@ -461,7 +461,7 @@ struct NewGRFParametersWindow : public W
 
	virtual void OnResize()
 
	{
 
		NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_NP_BACKGROUND);
 
		this->vscroll->SetCapacity(nwi->current_y / this->line_height);
 
		this->vscroll->SetCapacityFromWidget(this, WID_NP_BACKGROUND);
 
		nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
 
	}
 

	
src/news_gui.cpp
Show inline comments
 
@@ -1084,7 +1084,7 @@ struct MessageHistoryWindow : Window {
 

	
 
	virtual void OnResize()
 
	{
 
		this->vscroll->SetCapacity(this->GetWidget<NWidgetBase>(WID_MH_BACKGROUND)->current_y / this->line_height);
 
		this->vscroll->SetCapacityFromWidget(this, WID_MH_BACKGROUND);
 
	}
 
};
 

	
0 comments (0 inline, 0 general)