minor stickers and smileys window fixes
This commit is contained in:
parent
eb9ab56c6e
commit
c97fb6b467
4 changed files with 5 additions and 11 deletions
|
@ -34,7 +34,7 @@ class SmileyLoader:
|
||||||
print('Smiley pack {} loaded'.format(pack_name))
|
print('Smiley pack {} loaded'.format(pack_name))
|
||||||
keys, values, self._list = [], [], []
|
keys, values, self._list = [], [], []
|
||||||
for key, value in tmp.items():
|
for key, value in tmp.items():
|
||||||
value = self.get_smileys_path() + value
|
value = util.join_path(self.get_smileys_path(), value)
|
||||||
if value not in values:
|
if value not in values:
|
||||||
keys.append(key)
|
keys.append(key)
|
||||||
values.append(value)
|
values.append(value)
|
||||||
|
|
|
@ -10,9 +10,9 @@ def load_stickers():
|
||||||
d = util.get_stickers_directory()
|
d = util.get_stickers_directory()
|
||||||
keys = [x[1] for x in os.walk(d)][0]
|
keys = [x[1] for x in os.walk(d)][0]
|
||||||
for key in keys:
|
for key in keys:
|
||||||
path = d + key + '/'
|
path = util.join_path(d, key)
|
||||||
files = filter(lambda f: f.endswith('.png'), os.listdir(path))
|
files = filter(lambda f: f.endswith('.png'), os.listdir(path))
|
||||||
files = map(lambda f: str(path + f), files)
|
files = map(lambda f: util.join_path(path, f), files)
|
||||||
result.extend(files)
|
result.extend(files)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -570,8 +570,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||||
self.menu.hide()
|
self.menu.hide()
|
||||||
if self._contacts_manager.get_curr_contact() is not None:
|
if self._contacts_manager.get_curr_contact() is not None:
|
||||||
self.smiley = self._widget_factory.create_smiley_window(self)
|
self.smiley = self._widget_factory.create_smiley_window(self)
|
||||||
self.smiley.setGeometry(QtCore.QRect(self.x() if self._settings['mirror_mode'] else 270 + self.x(),
|
self.smiley.setGeometry(QtCore.QRect(self.x() if self._settings['mirror_mode'] else 200 + self.x(),
|
||||||
self.y() + self.height() - 200,
|
self.y() + self.height() - 400,
|
||||||
self.smiley.width(),
|
self.smiley.width(),
|
||||||
self.smiley.height()))
|
self.smiley.height()))
|
||||||
self.smiley.show()
|
self.smiley.show()
|
||||||
|
|
|
@ -22,9 +22,6 @@ class WidgetsFactory:
|
||||||
def create_screenshot_window(self, *args):
|
def create_screenshot_window(self, *args):
|
||||||
return ScreenShotWindow(self._file_transfer_handler, self._contacts_manager, *args)
|
return ScreenShotWindow(self._file_transfer_handler, self._contacts_manager, *args)
|
||||||
|
|
||||||
def create_smiley_window(self, parent):
|
|
||||||
return SmileyWindow(parent, self._smiley_loader)
|
|
||||||
|
|
||||||
def create_welcome_window(self):
|
def create_welcome_window(self):
|
||||||
return WelcomeScreen(self._settings)
|
return WelcomeScreen(self._settings)
|
||||||
|
|
||||||
|
@ -49,9 +46,6 @@ class WidgetsFactory:
|
||||||
def create_add_contact_window(self, tox_id):
|
def create_add_contact_window(self, tox_id):
|
||||||
return AddContact(self._settings, self._contacts_manager, tox_id)
|
return AddContact(self._settings, self._contacts_manager, tox_id)
|
||||||
|
|
||||||
def create_welcome_window(self):
|
|
||||||
return WelcomeScreen(self._settings)
|
|
||||||
|
|
||||||
def create_privacy_settings_window(self):
|
def create_privacy_settings_window(self):
|
||||||
return PrivacySettings(self._contacts_manager, self._settings)
|
return PrivacySettings(self._contacts_manager, self._settings)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue