Added reset UI flag

Resets the ui theme to default and the transparency to default
This commit is contained in:
A_D authored and Athanasius committed 2021-04-01 14:45:47 +01:00
1 parent 0258d881ea
commit 2a9ac882cd
2 files changed
+17 -4

No files matched your search

+1
View File
@@ -0,0 +1 @@
EDMarketConnector.exe --reset-ui
+16 -4
View File
@@ -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