From 124decc34ab724528e6ac4d081c19c3b4738a68f Mon Sep 17 00:00:00 2001 From: SHooZ Date: Wed, 3 May 2017 19:42:37 +0300 Subject: [PATCH] Add padding for search field and contacts nicknames in default theme --- toxygen/main.py | 9 +++------ toxygen/settings.py | 2 +- toxygen/styles/style.qrc | 3 +++ toxygen/styles/style.qss | 4 ++++ 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 toxygen/styles/style.qss diff --git a/toxygen/main.py b/toxygen/main.py index 8d2cee9..44e6cbe 100644 --- a/toxygen/main.py +++ b/toxygen/main.py @@ -187,12 +187,9 @@ class Toxygen: # application color scheme for theme in settings.built_in_themes().keys(): if settings['theme'] == theme: - try: - with open(curr_directory() + settings.built_in_themes()[theme]) as fl: - style = fl.read() - app.setStyleSheet(style) - except IsADirectoryError: - app.setStyleSheet('') # for default style + with open(curr_directory() + settings.built_in_themes()[theme]) as fl: + style = fl.read() + app.setStyleSheet(style) lang = Settings.supported_languages()[settings['language']] translator = QtCore.QTranslator() diff --git a/toxygen/settings.py b/toxygen/settings.py index ca15d3e..6edce36 100644 --- a/toxygen/settings.py +++ b/toxygen/settings.py @@ -156,7 +156,7 @@ class Settings(dict, Singleton): def built_in_themes(): return { 'dark': '/styles/dark_style.qss', - 'default': '' + 'default': '/styles/style.qss' } def upgrade(self): diff --git a/toxygen/styles/style.qrc b/toxygen/styles/style.qrc index 9759a62..7ceed90 100644 --- a/toxygen/styles/style.qrc +++ b/toxygen/styles/style.qrc @@ -43,4 +43,7 @@ dark_style.qss + + style.qss + diff --git a/toxygen/styles/style.qss b/toxygen/styles/style.qss new file mode 100644 index 0000000..11beeb5 --- /dev/null +++ b/toxygen/styles/style.qss @@ -0,0 +1,4 @@ +#contact_name +{ + padding-left: 22px; +}