mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-06 02:13:41 +03:00
Merge pull request #1404 from A-UNDERSCORE-D/fix/1155/Include-geometry-window-position-in---reset-ui
Reset geometry and UI scale with --reset-ui
This commit is contained in:
commit
3cb2c23257
@ -74,7 +74,7 @@ if __name__ == '__main__': # noqa: C901
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--reset-ui',
|
'--reset-ui',
|
||||||
help='reset UI theme and transparency to defaults',
|
help='Reset UI theme, transparency, font, font size, ui scale, and ui geometry to default',
|
||||||
action='store_true'
|
action='store_true'
|
||||||
)
|
)
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -1865,9 +1865,13 @@ sys.path: {sys.path}'''
|
|||||||
if args.reset_ui:
|
if args.reset_ui:
|
||||||
config.set('theme', 0) # 'Default' theme uses ID 0
|
config.set('theme', 0) # 'Default' theme uses ID 0
|
||||||
config.set('ui_transparency', 100) # 100 is completely opaque
|
config.set('ui_transparency', 100) # 100 is completely opaque
|
||||||
config.delete('font')
|
config.delete('font', suppress=True)
|
||||||
config.delete('font_size')
|
config.delete('font_size', suppress=True)
|
||||||
logger.info('reset theme, font, font size, and transparency to default.')
|
|
||||||
|
config.set('ui_scale', 100) # 100% is the default here
|
||||||
|
config.delete('geometry', suppress=True) # unset is recreated by other code
|
||||||
|
|
||||||
|
logger.info('reset theme, transparency, font, font size, ui scale, and ui geometry to default.')
|
||||||
|
|
||||||
# We prefer a UTF-8 encoding gets set, but older Windows versions have
|
# 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
|
# issues with this. From Windows 10 1903 onwards we can rely on the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user