From e69cf43dffdf3b6e248fd531891f9105b2ce806f Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Wed, 1 Dec 2021 01:00:56 +0200 Subject: [PATCH] Fixed compilation --- src/settings_gui.h | 8 ++------ src/window.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/settings_gui.h b/src/settings_gui.h index 5daabd84fb..72e23ac125 100644 --- a/src/settings_gui.h +++ b/src/settings_gui.h @@ -14,13 +14,9 @@ #include "widgets/dropdown_type.h" /** Width of setting buttons */ -#define SETTING_BUTTON_WIDTH (GetMinButtonSize() * 2) +#define SETTING_BUTTON_WIDTH ((int)GetMinButtonSize() * 2) /** Height of setting buttons */ -#define SETTING_BUTTON_HEIGHT (GetMinButtonSize()) - - -extern int SETTING_BUTTON_WIDTH; ///< Width of setting buttons -extern int SETTING_BUTTON_HEIGHT; ///< Height of setting buttons +#define SETTING_BUTTON_HEIGHT ((int)GetMinButtonSize()) void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clickable_left, bool clickable_right); void DrawDropDownButton(int x, int y, Colours button_colour, bool state, bool clickable); diff --git a/src/window.cpp b/src/window.cpp index 2eee0df862..634d46f800 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3795,7 +3795,7 @@ void RelocateAllWindows(int neww, int newh) break; case WC_STATUS_BAR: - ResizeWindow(w, std::min(neww, std::min(_toolbar_width, _screen.width * 2 / 3 - SETTING_BUTTON_HEIGHT * 2)) - w->width, 0, false); + ResizeWindow(w, std::min(neww, std::min(_toolbar_width, _screen.width * 2 / 3 - GetMinButtonSize() * 2)) - w->width, 0, false); top = newh - w->height; left = PositionStatusbar(w);