Gooey
Gooey copied to clipboard
Bad defaults on macos dark mode
Please consider fix default color values for macos "dark mode". Example: https://github.com/LeoFCardoso/pdf2pdfocr/issues/17
fill out the issue template, please
Sorry, please consider the template.
- [ ] macOS Catalina 10.15.4
- [ ] Python 3.7.6
- [ ] Gooey 1.0.3 (from pip)
- [ ] Thorough description of problem:
- [ ] Expected Behavior = Good color defaults on macOS dark mode.
- [ ] Actual Behavior = Bad default colors in dark mode. Light mode is ok.
- [ ] A minimal code example -> https://github.com/LeoFCardoso/pdf2pdfocr/blob/master/pdf2pdfocr_gui.py
- [ ] Screenshot -> https://github.com/LeoFCardoso/pdf2pdfocr/issues/17
Same with the new 1.0.4.
- [ ] OS: Mac OS Catalina 10.15.5
- [ ] Python Version: Python 3.7.7
- [ ] Gooey Version: Gooey 1.0.4.0.0.0
- [ ] Thorough description of problem: Button color defaults are wrong in dark mode, cannot read label.
- [ ] Expected Behavior: Button text color is different from button background color.
- [ ] Actual Behavior: Button text color is same as button background color.
- [ ] A minimal code example -- preferably copy/pastable in the issue itself (less time figuring out how to run your code == more time debugging!)
- [ ] Screenshot (if visual quirk): Attached.
- [ ] Anything else you may think will be helpful: None
from gooey import Gooey
import argparse
@Gooey
def main():
parser = argparse.ArgumentParser()
parser.add_argument("What… is the air-speed velocity of an unladen swallow?")
args = parser.parse_args()
if __name__ == "__main__":
main()```
I have done some debugging and investigation on where the color defaults for wxPython widgets are that break dark mode. I have experimented with the widgets_demo.py of GooeyExamples. Here is what I have so far:
`
item_default = {
'error_color': '#ea7878',
'label_color': '#ffffff',
'help_color': '#363636',
'full_width': False,
'validator': {
'type': 'local',
'test': 'lambda x: True',
'message': ''
},
'external_validator': {
'cmd': '',
}
}
@Gooey(dump_build_config=True,
program_name="Widget Demo",
advanced=True,
auto_start=False,
body_bg_color='#262626',
header_bg_color='#262626',
footer_bg_color='#262626',
sidebar_bg_color='#262626',
)
def main():
desc = "Example application to show Gooey's various widgets"
file_help_msg = "Name of the file you want to process"
my_cool_parser = GooeyParser(description=desc)
for group in my_cool_parser.parser._action_groups:
group.gooey_options = {'label_color': '#ffffff', 'description_color': '#363636'}
my_cool_parser.add_argument(
"FileChooser", help=file_help_msg, widget="FileChooser", gooey_options=item_default)
my_cool_parser.add_argument(
"DirectoryChooser", help=file_help_msg, widget="DirChooser", gooey_options=item_default)
my_cool_parser.add_argument(
"FileSaver", help=file_help_msg, widget="FileSaver", gooey_options=item_default)
my_cool_parser.add_argument(
"MultiFileChooser", nargs='*', help=file_help_msg, widget="MultiFileChooser", gooey_options=item_default)
`
Combining the dark mode color defaults with a call to
wx.SystemSettings.GetAppearance
might be part of the solution
It was all perfect but this tiny color thing is really a problem. I'd love to change the font color and font size of TextField myself.
I am using macOS Big Sur version 11.3.
Any updates here?
please fix