[improvement][ui] hdpi settings on the config file

This commit is contained in:
Vinícius Moreira
2020-01-22 12:59:39 -03:00
parent 6afda31f93
commit 0ae836a046
5 changed files with 14 additions and 11 deletions

View File

@@ -31,7 +31,6 @@ def main():
args = app_args.read()
logger = logs.new_logger(__app_name__, bool(args.logs))
app_args.validate(args, logger)
local_config = config.read_config(update_file=True)
@@ -71,7 +70,10 @@ def main():
app.setApplicationVersion(__version__)
app_icon = util.get_default_icon()[1]
app.setWindowIcon(app_icon)
app.setAttribute(Qt.AA_UseHighDpiPixmaps) # This fix images on HDPI resolution, not tested on non HDPI
if local_config['ui']['hdpi']:
logger.info("HDPI settings activated")
app.setAttribute(Qt.AA_UseHighDpiPixmaps) # This fix images on HDPI resolution, not tested on non HDPI
if local_config['ui']['style']:
app.setStyle(str(local_config['ui']['style']))

View File

@@ -15,11 +15,3 @@ def read() -> Namespace:
parser.add_argument('--show-panel', action="store_true", help='Shows the management panel after the app icon is attached to the tray.')
parser.add_argument('--reset', action="store_true", help='Removes all configuration and cache files')
return parser.parse_args()
def validate(args: Namespace, logger: logging.Logger):
if args.logs == 1:
logger.info("Logs are enabled")
return args

View File

@@ -43,7 +43,9 @@ def read_config(update_file: bool = False) -> dict:
'default_icon': None,
'updates_icon': None
},
'style': None
'style': None,
'hdpi': True
},
'download': {
'multithreaded': True,