Skip to content

Commit 76833f5

Browse files
committed
Improve margin for InfoBox title
1 parent 8130de7 commit 76833f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pygamepopup/components/info_box.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Defines InfoBox class, an helper to draw any kind of popup (menu or informative message).
2+
Defines InfoBox class, a helper to draw any kind of popup (menu or informative message).
33
"""
44

55
from __future__ import annotations
@@ -66,7 +66,7 @@ class InfoBox:
6666
element_linked (pygame.Rect): the pygame Rect of the element linked to this infoBox if there is one
6767
has_close_button (bool): whether the infoBox has a close button or not
6868
title_color (pygame.Color): the color of the title
69-
element_grid (list[list[BoxElement]): the grid containing the components that should be rendered by the infoBox
69+
element_grid (list[list[BoxElement]]): the grid containing the components that should be rendered by the infoBox
7070
buttons (Sequence[Button]): the sequence of buttons of the infoBox, including the close button if present
7171
sprite (pygame.Surface): the pygame Surface corresponding to the sprite of the infoBox
7272
visible_on_background (bool): whether the popup is visible on background or not
@@ -168,7 +168,7 @@ def init_elements(self) -> list[_Row]:
168168
self.title,
169169
pygame.Vector2(0, 0),
170170
_default_fonts["info_box_title"],
171-
(20, 0, 20, 0),
171+
(10, 0, 30, 0),
172172
self.title_color,
173173
)
174174
self.__separator["vertical_position"] += title.get_height()
@@ -197,7 +197,7 @@ def __determine_height(self) -> int:
197197
Returns:
198198
int: the computed height.
199199
"""
200-
# Margin to be add at begin and at end
200+
# Margin to be added at begin and at end
201201
height: int = MARGIN_BOX * 2
202202
self.__separator["height"] -= height
203203
self.__separator["vertical_position"] += height

0 commit comments

Comments
 (0)