diff options
author | peter1138 <peter1138@openttd.org> | 2014-09-20 10:23:38 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2014-09-20 10:23:38 +0000 |
commit | e353ef5908456a08f6c00caa19d967c04d109764 (patch) | |
tree | 95e0f1da36ca64f7e84fdf04683f05d6de79469e | |
parent | c4902c4150285f406f88755c4f68286127e39604 (diff) | |
download | openttd-e353ef5908456a08f6c00caa19d967c04d109764.tar.xz |
(svn r26858) -Codechange: Rearrange smallmap filter and settings expand/collapse buttons to fix frame borders and allow buttons to fit height of resize button.
-rw-r--r-- | src/settings_gui.cpp | 15 | ||||
-rw-r--r-- | src/smallmap_gui.cpp | 18 |
2 files changed, 14 insertions, 19 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 4fe95ada4..320b19d08 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2319,16 +2319,13 @@ static const NWidgetPart _nested_settings_selection_widgets[] = { NWidget(WWT_PANEL, COLOUR_MAUVE), SetMinimalSize(400, 40), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GS_HELP_TEXT), SetMinimalSize(300, 25), SetFill(1, 1), SetResize(1, 0), SetPadding(WD_FRAMETEXT_TOP, WD_FRAMETEXT_RIGHT, WD_FRAMETEXT_BOTTOM, WD_FRAMETEXT_LEFT), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_MAUVE), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, WID_GS_EXPAND_ALL), SetDataTip(STR_CONFIG_SETTING_EXPAND_ALL, STR_NULL), - NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, WID_GS_COLLAPSE_ALL), SetDataTip(STR_CONFIG_SETTING_COLLAPSE_ALL, STR_NULL), - NWidget(NWID_SPACER, INVALID_COLOUR), SetFill(1, 1), SetResize(1, 0), - EndContainer(), - EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), + EndContainer(), + NWidget(NWID_HORIZONTAL), + NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, WID_GS_EXPAND_ALL), SetDataTip(STR_CONFIG_SETTING_EXPAND_ALL, STR_NULL), + NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, WID_GS_COLLAPSE_ALL), SetDataTip(STR_CONFIG_SETTING_COLLAPSE_ALL, STR_NULL), + NWidget(WWT_PANEL, COLOUR_MAUVE), SetFill(1, 0), SetResize(1, 0), EndContainer(), + NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), }; diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index a8da3284e..6be0a0fff 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1772,17 +1772,15 @@ static const NWidgetPart _nested_smallmap_widgets[] = { NWidgetFunction(SmallMapDisplay), // Smallmap display and legend bar + image buttons. /* Bottom button row and resize box. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_BROWN), - NWidget(NWID_HORIZONTAL), - NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SM_SELECT_BUTTONS), - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, WID_SM_ENABLE_ALL), SetDataTip(STR_SMALLMAP_ENABLE_ALL, STR_NULL), - NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, WID_SM_DISABLE_ALL), SetDataTip(STR_SMALLMAP_DISABLE_ALL, STR_NULL), - NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_SM_SHOW_HEIGHT), SetDataTip(STR_SMALLMAP_SHOW_HEIGHT, STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT), - EndContainer(), - NWidget(NWID_SPACER), SetFill(1, 1), + NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SM_SELECT_BUTTONS), + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, WID_SM_ENABLE_ALL), SetDataTip(STR_SMALLMAP_ENABLE_ALL, STR_NULL), + NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, WID_SM_DISABLE_ALL), SetDataTip(STR_SMALLMAP_DISABLE_ALL, STR_NULL), + NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_SM_SHOW_HEIGHT), SetDataTip(STR_SMALLMAP_SHOW_HEIGHT, STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT), + NWidget(WWT_PANEL, COLOUR_BROWN), SetFill(1, 0), SetResize(1, 0), EndContainer(), - NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), + EndContainer(), + NWidget(WWT_PANEL, COLOUR_BROWN), SetFill(1, 0), SetResize(1, 0), EndContainer(), EndContainer(), NWidget(WWT_RESIZEBOX, COLOUR_BROWN), |