From 2fa6b01c6930cc993c66d7cddeed56a0e7cc4737 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 22 Mar 2016 21:36:53 +0300 Subject: [PATCH] style update + active user data truncated --- src/profile.py | 6 ++++-- src/styles/style.qss | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/profile.py b/src/profile.py index b80dbfd..73e040f 100644 --- a/src/profile.py +++ b/src/profile.py @@ -444,8 +444,10 @@ class Profile(Contact, Singleton): self._messages.scrollToBottom() else: friend = self._friends[self._active_friend] - self._screen.account_name.setText(friend.name) - self._screen.account_status.setText(friend.status_message) + name = friend.name if len(friend.name) < 50 else friend.name[:47] + '...' + 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]) if not os.path.isfile(avatar_path): # load default image avatar_path = curr_directory() + '/images/avatar.png' diff --git a/src/styles/style.qss b/src/styles/style.qss index f40befb..4735e55 100644 --- a/src/styles/style.qss +++ b/src/styles/style.qss @@ -1245,4 +1245,9 @@ QListWidget QPushButton { background-color: transparent; border: none; +} + +QPushButton:hover +{ + background-color: #4A4949; } \ No newline at end of file