Merge branch 'master' into jgrpp

# Conflicts:
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
This commit is contained in:
Jonathan G Rennison
2023-04-17 20:51:54 +01:00
19 changed files with 125 additions and 102 deletions

View File

@@ -642,9 +642,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