Changeset - r27081:8dfb9e49ef80
[Not reviewed]
master
0 1 0
Peter Nelson - 14 months ago 2023-04-12 11:20:07
peter1138@openttd.org
Fix: DropDownListColourItem didn't provide width nor scale vertical padding.
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/company_gui.cpp
Show inline comments
 
@@ -592,9 +592,14 @@ public:
 
		return this->result >= COLOUR_END ? STR_COLOUR_DEFAULT : _colour_dropdown[this->result];
 
	}
 

	
 
	uint Width() const override
 
	{
 
		return ScaleGUITrad(28) + WidgetDimensions::scaled.hsep_normal + GetStringBoundingBox(this->String()).width + WidgetDimensions::scaled.dropdowntext.Horizontal();
 
	}
 

	
 
	uint Height(uint width) const override
 
	{
 
		return std::max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2);
 
		return std::max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + WidgetDimensions::scaled.vsep_normal);
 
	}
 

	
 
	bool Selectable() const override
0 comments (0 inline, 0 general)