Merge branch 'master' into jgrpp
# Conflicts: # CMakeLists.txt # src/saveload/town_sl.cpp # src/screenshot.h # src/script/api/ai/ai_date.hpp.sq # src/script/api/ai/ai_marine.hpp.sq # src/script/api/ai/ai_station.hpp.sq # src/script/api/game/game_date.hpp.sq # src/script/api/game/game_marine.hpp.sq # src/script/api/game/game_station.hpp.sq # src/script/api/game/game_window.hpp.sq # src/script/api/script_window.hpp # src/script/api/template/template_window.hpp.sq # src/signal.cpp # src/statusbar_gui.cpp # src/toolbar_gui.cpp # src/viewport.cpp # src/viewport_func.h
This commit is contained in:
@@ -894,13 +894,17 @@ struct SpriteAlignerWindow : Window {
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
{
|
||||
if (widget != WID_SA_LIST) return;
|
||||
|
||||
resize->height = max(11, FONT_HEIGHT_NORMAL + 1);
|
||||
resize->width = 1;
|
||||
|
||||
/* Resize to about 200 pixels (for the preview) */
|
||||
size->height = (1 + 200 / resize->height) * resize->height;
|
||||
switch (widget) {
|
||||
case WID_SA_SPRITE:
|
||||
size->height = ScaleGUITrad(200);
|
||||
break;
|
||||
case WID_SA_LIST:
|
||||
resize->height = max(11, FONT_HEIGHT_NORMAL + 1);
|
||||
resize->width = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DrawWidget(const Rect &r, int widget) const override
|
||||
|
Reference in New Issue
Block a user