style update + active user data truncated

This commit is contained in:
ingvar1995 2016-03-22 21:36:53 +03:00
parent f7969f8381
commit 2fa6b01c69
2 changed files with 9 additions and 2 deletions

View file

@ -444,8 +444,10 @@ class Profile(Contact, Singleton):
self._messages.scrollToBottom() self._messages.scrollToBottom()
else: else:
friend = self._friends[self._active_friend] friend = self._friends[self._active_friend]
self._screen.account_name.setText(friend.name) name = friend.name if len(friend.name) < 50 else friend.name[:47] + '...'
self._screen.account_status.setText(friend.status_message) status_message = friend.status_message if len(friend.status_message) < 66 else friend.status_message[:63] + '...'
self._screen.account_name.setText(name)
self._screen.account_status.setText(status_message)
avatar_path = (Settings.get_default_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2]) avatar_path = (Settings.get_default_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
if not os.path.isfile(avatar_path): # load default image if not os.path.isfile(avatar_path): # load default image
avatar_path = curr_directory() + '/images/avatar.png' avatar_path = curr_directory() + '/images/avatar.png'

View file

@ -1246,3 +1246,8 @@ QListWidget QPushButton
background-color: transparent; background-color: transparent;
border: none; border: none;
} }
QPushButton:hover
{
background-color: #4A4949;
}