Move some macros to their own file.
This way those macros can be reused for all containers that need scrollbars.
This commit is contained in:
parent
53bdb88159
commit
ebf482bbb5
3 changed files with 99 additions and 96 deletions
45
data/gui/default/macros/horizontal_scrollbar.cfg
Normal file
45
data/gui/default/macros/horizontal_scrollbar.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
# Defines the default _horizontal_scrollbar_grid for several widgets.
|
||||
|
||||
#define GUI__HORIZONTAL_SCROLLBAR_GRID
|
||||
horizontal_grow = "true"
|
||||
[grid]
|
||||
id = "_horizontal_scrollbar_grid"
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_left"
|
||||
definition = "left_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = "true"
|
||||
|
||||
[horizontal_scrollbar]
|
||||
id = "_horizontal_scrollbar"
|
||||
definition = "default"
|
||||
[/horizontal_scrollbar]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_right"
|
||||
definition = "right_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
#enddef
|
||||
|
52
data/gui/default/macros/vertical_scrollbar.cfg
Normal file
52
data/gui/default/macros/vertical_scrollbar.cfg
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Defines the default _vertical_scrollbar_grid for several widgets.
|
||||
|
||||
#define GUI__VERTICAL_SCROLLBAR_GRID
|
||||
vertical_grow = "true"
|
||||
[grid]
|
||||
id = "_vertical_scrollbar_grid"
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_up"
|
||||
definition = "up_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
||||
grow_factor = 1
|
||||
[column]
|
||||
vertical_grow = "true"
|
||||
|
||||
[vertical_scrollbar]
|
||||
id = "_vertical_scrollbar"
|
||||
definition = "default"
|
||||
[/vertical_scrollbar]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_down"
|
||||
definition = "down_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
#enddef
|
|
@ -155,99 +155,7 @@
|
|||
|
||||
#ifdef NEW_DRAW
|
||||
|
||||
#define _GUI_VERTICAL_SCROLLBAR_GRID
|
||||
vertical_grow = "true"
|
||||
[grid]
|
||||
id = "_vertical_scrollbar_grid"
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_up"
|
||||
definition = "up_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
||||
grow_factor = 1
|
||||
[column]
|
||||
vertical_grow = "true"
|
||||
|
||||
[vertical_scrollbar]
|
||||
id = "_vertical_scrollbar"
|
||||
definition = "default"
|
||||
[/vertical_scrollbar]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_down"
|
||||
definition = "down_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
#enddef
|
||||
|
||||
#define _GUI_HORIZONTAL_SCROLLBAR_GRID
|
||||
horizontal_grow = "true"
|
||||
[grid]
|
||||
id = "_horizontal_scrollbar_grid"
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_left"
|
||||
definition = "left_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = "true"
|
||||
|
||||
[horizontal_scrollbar]
|
||||
id = "_horizontal_scrollbar"
|
||||
definition = "default"
|
||||
[/horizontal_scrollbar]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
|
||||
# note we want a special button definition for this later.
|
||||
[button]
|
||||
id = "_half_page_right"
|
||||
definition = "right_arrow"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
#enddef
|
||||
|
||||
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED
|
||||
[resolution]
|
||||
|
@ -318,7 +226,7 @@ horizontal_grow = "true"
|
|||
|
||||
[column]
|
||||
|
||||
{_GUI_VERTICAL_SCROLLBAR_GRID}
|
||||
{GUI__VERTICAL_SCROLLBAR_GRID}
|
||||
|
||||
[/column]
|
||||
|
||||
|
@ -328,7 +236,7 @@ horizontal_grow = "true"
|
|||
|
||||
[column]
|
||||
|
||||
{_GUI_HORIZONTAL_SCROLLBAR_GRID}
|
||||
{GUI__HORIZONTAL_SCROLLBAR_GRID}
|
||||
|
||||
[/column]
|
||||
|
||||
|
@ -369,8 +277,6 @@ horizontal_grow = "true"
|
|||
|
||||
[/scroll_label_definition]
|
||||
|
||||
#undef _GUI_VERTICAL_SCROLLBAR_GRID
|
||||
#undef _GUI_HORIZONTAL_SCROLLBAR_GRID
|
||||
#undef _GUI_RESOLUTION
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue