commit
bf1bea1e93
8 changed files with 1358 additions and 1331 deletions
|
@ -12,9 +12,9 @@ include toxygen/smileys/starwars/*.png
|
|||
include toxygen/smileys/starwars/config.json
|
||||
include toxygen/smileys/ksk/*.png
|
||||
include toxygen/smileys/ksk/config.json
|
||||
include toxygen/styles/style.qss
|
||||
include toxygen/styles/*.qss
|
||||
include toxygen/translations/*.qm
|
||||
include toxygen/libs/libtox.dll
|
||||
include toxygen/libs/libsodium.a
|
||||
include toxygen/libs/libtox64.dll
|
||||
include toxygen/libs/libsodium64.a
|
||||
include toxygen/libs/libsodium64.a
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.7 KiB |
|
@ -59,10 +59,9 @@ class Toxygen:
|
|||
if platform.system() == 'Linux':
|
||||
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
|
||||
|
||||
# application color scheme
|
||||
with open(curr_directory() + '/styles/style.qss') as fl:
|
||||
dark_style = fl.read()
|
||||
app.setStyleSheet(dark_style)
|
||||
with open(curr_directory() + '/styles/dark_style.qss') as fl:
|
||||
style = fl.read()
|
||||
app.setStyleSheet(style)
|
||||
|
||||
encrypt_save = toxes.ToxES()
|
||||
|
||||
|
@ -185,6 +184,13 @@ class Toxygen:
|
|||
else:
|
||||
settings.set_active_profile()
|
||||
|
||||
# application color scheme
|
||||
for theme in settings.built_in_themes().keys():
|
||||
if settings['theme'] == theme:
|
||||
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()
|
||||
translator.load(curr_directory() + '/translations/' + lang)
|
||||
|
|
|
@ -581,11 +581,10 @@ class InterfaceSettings(CenteredWidget):
|
|||
self.label.setFont(font)
|
||||
self.themeSelect = QtGui.QComboBox(self)
|
||||
self.themeSelect.setGeometry(QtCore.QRect(30, 40, 120, 30))
|
||||
list_of_themes = ['dark']
|
||||
self.themeSelect.addItems(list_of_themes)
|
||||
self.themeSelect.addItems(list(settings.built_in_themes().keys()))
|
||||
theme = settings['theme']
|
||||
if theme in list_of_themes:
|
||||
index = list_of_themes.index(theme)
|
||||
if theme in settings.built_in_themes().keys():
|
||||
index = list(settings.built_in_themes().keys()).index(theme)
|
||||
else:
|
||||
index = 0
|
||||
self.themeSelect.setCurrentIndex(index)
|
||||
|
@ -726,6 +725,14 @@ class InterfaceSettings(CenteredWidget):
|
|||
def closeEvent(self, event):
|
||||
settings = Settings.get_instance()
|
||||
settings['theme'] = str(self.themeSelect.currentText())
|
||||
try:
|
||||
theme = settings['theme']
|
||||
app = QtGui.QApplication.instance()
|
||||
with open(curr_directory() + settings.built_in_themes()[theme]) as fl:
|
||||
style = fl.read()
|
||||
app.setStyleSheet(style)
|
||||
except IsADirectoryError:
|
||||
app.setStyleSheet('') # for default style
|
||||
settings['smileys'] = self.smileys.isChecked()
|
||||
restart = False
|
||||
if settings['mirror_mode'] != self.mirror_mode.isChecked():
|
||||
|
|
|
@ -99,7 +99,7 @@ class Settings(dict, Singleton):
|
|||
Default profile settings
|
||||
"""
|
||||
return {
|
||||
'theme': 'default',
|
||||
'theme': 'dark',
|
||||
'ipv6_enabled': True,
|
||||
'udp_enabled': True,
|
||||
'proxy_type': 0,
|
||||
|
@ -152,6 +152,13 @@ class Settings(dict, Singleton):
|
|||
'Ukrainian': 'uk_UA'
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def built_in_themes():
|
||||
return {
|
||||
'dark': '/styles/dark_style.qss',
|
||||
'default': '/styles/style.qss'
|
||||
}
|
||||
|
||||
def upgrade(self):
|
||||
default = Settings.get_default_settings()
|
||||
for key in default:
|
||||
|
|
1324
toxygen/styles/dark_style.qss
Normal file
1324
toxygen/styles/dark_style.qss
Normal file
File diff suppressed because it is too large
Load diff
|
@ -41,6 +41,9 @@
|
|||
<file>rc/radio_unchecked.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="qdarkstyle">
|
||||
<file>dark_style.qss</file>
|
||||
</qresource>
|
||||
<qresource prefix="defaultstyle">
|
||||
<file>style.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue