Changeset - r25317:845aee38c395
[Not reviewed]
master
0 2 0
Peter Nelson - 3 years ago 2021-04-22 00:18:22
peter1138@openttd.org
Cleanup: Horizontal widget size is commonly width rather than length.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -1500,18 +1500,18 @@ void NWidgetVertical::AssignSizePosition
 
		position += child_height + child_wid->padding_top + child_wid->padding_bottom;
 
	}
 
}
 

	
 
/**
 
 * Generic spacer widget.
 
 * @param length Horizontal size of the spacer widget.
 
 * @param width  Horizontal size of the spacer widget.
 
 * @param height Vertical size of the spacer widget.
 
 */
 
NWidgetSpacer::NWidgetSpacer(int length, int height) : NWidgetResizeBase(NWID_SPACER, 0, 0)
 
NWidgetSpacer::NWidgetSpacer(int width, int height) : NWidgetResizeBase(NWID_SPACER, 0, 0)
 
{
 
	this->SetMinimalSize(length, height);
 
	this->SetMinimalSize(width, height);
 
	this->SetResize(0, 0);
 
}
 

	
 
void NWidgetSpacer::SetupSmallestSize(Window *w, bool init_array)
 
{
 
	this->smallest_x = this->min_x;
src/widget_type.h
Show inline comments
 
@@ -540,13 +540,13 @@ private:
 
/**
 
 * Spacer widget.
 
 * @ingroup NestedWidgets
 
 */
 
class NWidgetSpacer : public NWidgetResizeBase {
 
public:
 
	NWidgetSpacer(int length, int height);
 
	NWidgetSpacer(int width, int height);
 

	
 
	void SetupSmallestSize(Window *w, bool init_array) override;
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 

	
 
	void Draw(const Window *w) override;
 
	void SetDirty(const Window *w) const override;
0 comments (0 inline, 0 general)