From 55adbe10b74e6b4abfa2cdda6320afb4ebb8b092 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 25 Oct 2023 01:04:42 +0100 Subject: [PATCH] Add: WidgetDimensions for 'sparse' widget windows. These are for windows that have space between widgets instead of being clumped together. --- src/widget.cpp | 3 +++ src/window_gui.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/widget.cpp b/src/widget.cpp index 95d177484a..74bf61b2db 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -152,9 +152,12 @@ const WidgetDimensions WidgetDimensions::unscaled = { {WD_DROPDOWNTEXT_LEFT, WD_DROPDOWNTEXT_TOP, WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_BOTTOM}, ///< dropdowntext {20, 10, 20, 10}, ///< modalpopup {3, 3, 3, 3}, ///< picker + {10, 8, 10, 8}, ///< sparse window padding + {10, 8, 10, 1}, ///< resizable sparse window padding 1, ///< pressed 1, ///< vsep_picker WD_PAR_VSEP_NORMAL, ///< vsep_normal + 4, ///< vsep_sparse WD_PAR_VSEP_WIDE, ///< vsep_wide 2, ///< hsep_normal 6, ///< hsep_wide diff --git a/src/window_gui.h b/src/window_gui.h index 46dcdd6acb..f78cc0d907 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -51,10 +51,13 @@ struct WidgetDimensions { RectPadding dropdowntext; ///< Offsets of text within a dropdown widget. RectPadding modalpopup; ///< Padding for a modal popup. RectPadding picker; ///< Padding for a picker (dock, station, etc) window. + RectPadding sparse; ///< Padding used for 'sparse' widget window, usually containing multiple frames. + RectPadding sparse_resize; ///< Padding used for a resizeable 'sparse' widget window, usually containing multiple frames. int pressed; ///< Offset for contents of depressed widget. int vsep_picker; ///< Vertical spacing of picker-window widgets. int vsep_normal; ///< Normal vertical spacing. + int vsep_sparse; ///< Normal vertical spacing for 'sparse' widget window. int vsep_wide; ///< Wide vertical spacing. int hsep_normal; ///< Normal horizontal spacing. int hsep_wide; ///< Wide horizontal spacing.