Skip to content

Commit

Permalink
GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fix…
Browse files Browse the repository at this point in the history
…ed_height keys

[ci skip]
  • Loading branch information
Vultraz committed Nov 11, 2017
1 parent 556331a commit 9f386ed
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 64 deletions.
18 changes: 0 additions & 18 deletions data/gui/macros/_initial.cfg
Expand Up @@ -222,24 +222,6 @@
[/stacked_widget]
#enddef

# Forces a widget to be of a certain size and blocks it from growing.
#
# WIDTH Width for the widget.
# HEIGHT Height for the widget.
# WIDGET The widget to add to the item.
#
#define GUI_FORCE_WIDGET_SIZE WIDTH HEIGHT WIDGET
[size_lock]
definition = "default"
width = "{WIDTH}"
height = "{HEIGHT}"

[widget]
{WIDGET}
[/widget]
[/size_lock]
#enddef

#define GUI_WINDOW_FULLSCREEN
automatic_placement = false
x = 0
Expand Down
59 changes: 29 additions & 30 deletions data/gui/window/lobby_main.cfg
Expand Up @@ -764,35 +764,35 @@
horizontal_grow = true
vertical_grow = true

{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 20) / 100)" (
[grid]
[row]
grow_factor = 1
[grid]
fixed_height = "((screen_height * 20) / 100)"

[column]
grow_factor = 1
horizontal_grow = true
vertical_grow = true
[row]
grow_factor = 1

[chatbox]
id = "chat"
[/chatbox]
[/column]
[column]
grow_factor = 1
horizontal_grow = true
vertical_grow = true

[column]
grow_factor = 0
border = "top"
border_size = 5
horizontal_grow = true
vertical_grow = true
[chatbox]
id = "chat"
[/chatbox]
[/column]

[grid]
{_GUI_PLAYER_TREE_AREA}
[/grid]
[/column]
[/row]
[/grid]
)}
[column]
grow_factor = 0
border = "top"
border_size = 5
horizontal_grow = true
vertical_grow = true

[grid]
{_GUI_PLAYER_TREE_AREA}
[/grid]
[/column]
[/row]
[/grid]
[/column]
[/row]
[/grid]
Expand Down Expand Up @@ -883,11 +883,10 @@
horizontal_grow = true
vertical_grow = true

{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 25 / 100))" (
[chatbox]
id = "chat"
[/chatbox]
)}
[chatbox]
id = "chat"
fixed_height = "((screen_height * 25 / 100))"
[/chatbox]
[/column]
[/row]
[/grid]
Expand Down
11 changes: 5 additions & 6 deletions data/gui/window/mp_join_game.cfg
Expand Up @@ -411,7 +411,7 @@
# This is exactly the size of two large-sized buttons (116 x 2) plus the interior
# border space between them (10). It keeps this column the same size as the corresponding
# one in MP Staging, which has the above layout (2 buttons, etc).
{GUI_FORCE_WIDGET_MINIMUM_SIZE 242 0 (
{GUI_FORCE_WIDGET_MINIMUM_SIZE 242 0 (
[button]
id = "cancel"
definition = "large"
Expand Down Expand Up @@ -558,11 +558,10 @@
horizontal_grow = true
vertical_grow = true

{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 25 / 100))" (
[chatbox]
id = "chat"
[/chatbox]
)}
[chatbox]
id = "chat"
fixed_height = "((screen_height * 25 / 100))"
[/chatbox]
[/column]

[/row]
Expand Down
18 changes: 8 additions & 10 deletions data/gui/window/mp_staging.cfg
Expand Up @@ -707,11 +707,10 @@
horizontal_grow = true
vertical_grow = true

{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 25 / 100))" (
[chatbox]
id = "chat"
[/chatbox]
)}
[chatbox]
id = "chat"
fixed_height = "((screen_height * 25 / 100))"
[/chatbox]
[/column]

[column]
Expand Down Expand Up @@ -882,11 +881,10 @@
horizontal_grow = true
vertical_grow = true

{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 25 / 100))" (
[chatbox]
id = "chat"
[/chatbox]
)}
[chatbox]
id = "chat"
fixed_height = "((screen_height * 25 / 100))"
[/chatbox]
[/column]

[/row]
Expand Down

0 comments on commit 9f386ed

Please sign in to comment.