Merge branch 'master' into jgrpp

# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/gfx_func.h
#	src/group_gui.cpp
#	src/industry_gui.cpp
#	src/misc_gui.cpp
#	src/news_gui.cpp
#	src/settings_gui.cpp
#	src/ship_gui.cpp
#	src/smallmap_gui.cpp
#	src/station_gui.cpp
#	src/subsidy_gui.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_gui.cpp
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/widget.cpp
#	src/widgets/dropdown.cpp
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2023-12-17 01:16:40 +00:00
69 changed files with 525 additions and 543 deletions

View File

@@ -290,7 +290,7 @@ protected:
int height = 0;
/* Title lines */
height += FONT_HEIGHT_NORMAL; // Date always use exactly one line.
height += GetCharacterHeight(FS_NORMAL); // Date always use exactly one line.
SetDParamStr(0, !page->title.empty() ? page->title : this->selected_generic_title);
height += GetStringHeight(STR_STORY_BOOK_TITLE, max_width);
@@ -407,7 +407,7 @@ protected:
StoryPage *page = this->GetSelPage();
if (page == nullptr) return;
int max_width = GetAvailablePageContentWidth();
int element_dist = FONT_HEIGHT_NORMAL;
int element_dist = GetCharacterHeight(FS_NORMAL);
/* Make space for the header */
int main_y = GetHeadHeight(max_width) + element_dist;
@@ -428,7 +428,7 @@ protected:
if (fl == ElementFloat::None) {
/* Verify available width */
const int min_required_width = 10 * FONT_HEIGHT_NORMAL;
const int min_required_width = 10 * GetCharacterHeight(FS_NORMAL);
int left_offset = (left_width == 0) ? 0 : (left_width + element_dist);
int right_offset = (right_width == 0) ? 0 : (right_width + element_dist);
if (left_offset + right_offset + min_required_width >= max_width) {
@@ -599,7 +599,7 @@ public:
{
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_SB_SCROLLBAR);
this->vscroll->SetStepSize(FONT_HEIGHT_NORMAL);
this->vscroll->SetStepSize(GetCharacterHeight(FS_NORMAL));
/* Initialize page sort. */
this->story_pages.SetSortFuncs(StoryBookWindow::page_sorter_funcs);
@@ -697,7 +697,7 @@ public:
/* Draw content (now coordinates given to Draw** are local to the new clipping region). */
fr = fr.Translate(-fr.left, -fr.top);
int line_height = FONT_HEIGHT_NORMAL;
int line_height = GetCharacterHeight(FS_NORMAL);
const int scrollpos = this->vscroll->GetPosition();
int y_offset = -scrollpos;
@@ -759,7 +759,7 @@ public:
if (widget != WID_SB_SEL_PAGE && widget != WID_SB_PAGE_PANEL) return;
Dimension d;
d.height = FONT_HEIGHT_NORMAL;
d.height = GetCharacterHeight(FS_NORMAL);
d.width = 0;
switch (widget) {