Skip to content

Commit 9fa0330

Browse files
committed
Enhance docs
1 parent 96f8a7a commit 9fa0330

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

pygame_menu/widgets/core/widget.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -2144,19 +2144,16 @@ def _scale_warn(
21442144
# noinspection PyUnresolvedReferences
21452145
if not self._verbose:
21462146
return
2147-
elif self._scale[0] and scale:
2147+
# Iterate each type and warn accordingly
2148+
if self._scale[0] and scale:
21482149
warn('widget already has a scaling factor applied. Scaling has '
21492150
'been disabled')
21502151
if self._max_width[0] is not None and maxwidth:
2151-
warn(
2152-
'widget max width is not None. Set widget.set_max_width(None) '
2153-
'for disabling such feature. This scaling will be ignored'
2154-
)
2152+
warn('widget max width is not None. Set widget.set_max_width(None) '
2153+
'for disabling such feature. This scaling will be ignored')
21552154
if self._max_height[0] is not None and maxheight:
2156-
warn(
2157-
'widget max height is not None. Set widget.set_max_height(None) '
2158-
'for disabling such feature. This scaling will be ignored'
2159-
)
2155+
warn('widget max height is not None. Set widget.set_max_height(None) '
2156+
'for disabling such feature. This scaling will be ignored')
21602157

21612158
def set_max_width(
21622159
self,

0 commit comments

Comments
 (0)