You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment information
Describe your environment information, such as:
OS: Linux
python version: v3.11
pygame version: v2.5.1
pygame-menu version: v4.4.3
Describe the bug
While using a menubar style that calls self._check_title_color(background_menu=True) I get the following error when my Theme background_color is black (0, 0, 0).
venv/lib/python3.11/site-packages/pygame_menu/widgets/widget/menubar.py:203: UserWarning: title font color (0, 0, 0) is equal to the menu background color (0, 0, 0, 255), consider editing your Theme
warn(
Additional context
I was trying to debug the problem. "_check_title_color()" gets called 3 times and this is the output from "self._font_color" with the code above.
I found where the problem is coming from.
We are running self._menubar.set_menu(self) in menu.py:524 before we set the font variables with self._menubar.set_font() in menu.py:525. We end up running self._check_title_color() in menubar.py before we set the self._font_color in widget.py, and it takes the default value which is (0, 0, 0).
DKNorad
added a commit
to DKNorad/pygame-menu
that referenced
this issue
Nov 2, 2023
Environment information
Describe your environment information, such as:
Describe the bug
While using a menubar style that calls self._check_title_color(background_menu=True) I get the following error when my Theme background_color is black (0, 0, 0).
To Reproduce
Expected behavior
To not show the error.
Additional context
I was trying to debug the problem. "_check_title_color()" gets called 3 times and this is the output from "self._font_color" with the code above.
I can't figure out why on the first call it uses the default value of (0, 0, 0) and why it goes through it 3 times.
The text was updated successfully, but these errors were encountered: