diff --git a/EDMarketConnector - reset-ui.bat b/EDMarketConnector - reset-ui.bat new file mode 100644 index 00000000..01db6dfb --- /dev/null +++ b/EDMarketConnector - reset-ui.bat @@ -0,0 +1 @@ +EDMarketConnector.exe --reset-ui diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 4daa26e8..72d26f7e 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -1445,10 +1445,17 @@ if __name__ == "__main__": "such as EDSM, Inara.cz and EDDB." ) - parser.add_argument('--trace', - help='Set the Debug logging loglevel to TRACE', - action='store_true', - ) + parser.add_argument( + '--trace', + help='Set the Debug logging loglevel to TRACE', + action='store_true', + ) + + parser.add_argument( + '--reset-ui', + help='reset UI theme and transparency to defaults', + action='store_true' + ) args = parser.parse_args() @@ -1466,6 +1473,11 @@ executable: {sys.executable} sys.path: {sys.path}''' ) + if args.reset_ui: + config.set('theme', 0) # 'Default' theme uses ID 0 + config.set('ui_transparency', 100) # 100 is completely opaque + logger.info('reset theme and transparency to default.') + # We prefer a UTF-8 encoding gets set, but older Windows versions have # issues with this. From Windows 10 1903 onwards we can rely on the # manifest ActiveCodePage to set this, but that is silently ignored on