Skip to content

Commit

Permalink
Addon Manager/Addon List: center addon icon in available space
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 10, 2017
1 parent 2a49807 commit 93eb07a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions data/gui/macros/_initial.cfg
Expand Up @@ -238,6 +238,11 @@
y = "(screen_height / 2 - window_height / 2)"
#enddef

#define GUI_CENTERED_IMAGE
x = "(width / 2 - image_width / 2)"
y = "(height / 2 - image_height / 2)"
#enddef

#define GUI_HORIZONTAL_SPACER_LINE
[row]
grow_factor = 0
Expand Down
2 changes: 2 additions & 0 deletions data/gui/widget/addon_list.cfg
Expand Up @@ -170,6 +170,8 @@
name = "(text)"
w = "(min(image_original_width, 72))"
h = "(min(image_original_height, 72))"

{GUI_CENTERED_IMAGE}
[/image]

[/draw]
Expand Down
3 changes: 1 addition & 2 deletions data/gui/widget/image_default.cfg
Expand Up @@ -55,8 +55,7 @@

[image]
name = "(text)"
x = "(width / 2 - image_width / 2)"
y = "(height / 2 - image_height / 2)"
{GUI_CENTERED_IMAGE}
[/image]

[/draw]
Expand Down
4 changes: 3 additions & 1 deletion data/gui/window/addon_manager.cfg
Expand Up @@ -13,7 +13,7 @@
grow_factor = 0
border = "all"
border_size = 5
vertical_grow = "true"
vertical_alignment = "top"
horizontal_alignment = "left"

[drawing]
Expand All @@ -28,6 +28,8 @@
name = "(text)"
w = "(min(image_original_width, 72))"
h = "(min(image_original_height, 72))"

{GUI_CENTERED_IMAGE}
[/image]
[/draw]

Expand Down

0 comments on commit 93eb07a

Please sign in to comment.