Merge branch 'master' into jgrpp

# Conflicts:
#	src/articulated_vehicles.cpp
#	src/articulated_vehicles.h
#	src/autoreplace_cmd.cpp
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/core/format.hpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/group_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/misc/endian_buffer.hpp
#	src/music/music_driver.hpp
#	src/newgrf_gui.cpp
#	src/rail_cmd.cpp
#	src/road_gui.cpp
#	src/settings_type.h
#	src/strgen/strgen.cpp
#	src/strings.cpp
#	src/timetable_cmd.cpp
#	src/town.h
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widget.cpp
#	src/widgets/dropdown.cpp
#	src/widgets/road_widget.h
This commit is contained in:
Jonathan G Rennison
2023-12-16 23:54:58 +00:00
130 changed files with 1765 additions and 1676 deletions

View File

@@ -659,7 +659,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
}
if (underline) {
GfxFillRect(left, y + h, right, y + h, ctx.string_colourremap[1]);
GfxFillRect(left, y + h, right, y + h + WidgetDimensions::scaled.bevel.top - 1, ctx.string_colourremap[1]);
}
return (align & SA_HOR_MASK) == SA_RIGHT ? left : right;
@@ -733,6 +733,7 @@ int DrawString(int left, int right, int top, StringID str, TextColour colour, St
*/
int GetStringHeight(std::string_view str, int maxw, FontSize fontsize)
{
assert(maxw > 0);
Layouter layout(str, maxw, TC_FROMSTRING, fontsize);
return layout.GetBounds().height;
}