minor stickers and smileys window fixes

This commit is contained in:
ingvar1995 2018-05-24 15:20:21 +03:00
parent eb9ab56c6e
commit c97fb6b467
4 changed files with 5 additions and 11 deletions

View file

@ -34,7 +34,7 @@ class SmileyLoader:
print('Smiley pack {} loaded'.format(pack_name))
keys, values, self._list = [], [], []
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:
keys.append(key)
values.append(value)

View file

@ -10,9 +10,9 @@ def load_stickers():
d = util.get_stickers_directory()
keys = [x[1] for x in os.walk(d)][0]
for key in keys:
path = d + key + '/'
path = util.join_path(d, key)
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)
return result

View file

@ -570,8 +570,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.menu.hide()
if self._contacts_manager.get_curr_contact() is not None:
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.y() + self.height() - 200,
self.smiley.setGeometry(QtCore.QRect(self.x() if self._settings['mirror_mode'] else 200 + self.x(),
self.y() + self.height() - 400,
self.smiley.width(),
self.smiley.height()))
self.smiley.show()

View file

@ -22,9 +22,6 @@ class WidgetsFactory:
def create_screenshot_window(self, *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):
return WelcomeScreen(self._settings)
@ -49,9 +46,6 @@ class WidgetsFactory:
def create_add_contact_window(self, 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):
return PrivacySettings(self._contacts_manager, self._settings)