diff --git a/docs/ubuntu.png b/docs/ubuntu.png index aafd214..5178b7d 100755 Binary files a/docs/ubuntu.png and b/docs/ubuntu.png differ diff --git a/src/images/accept.png b/src/images/accept.png index 5b0fba6..aaa1388 100755 Binary files a/src/images/accept.png and b/src/images/accept.png differ diff --git a/src/images/decline.png b/src/images/decline.png index dfdf85d..9bbc9d5 100755 Binary files a/src/images/decline.png and b/src/images/decline.png differ diff --git a/src/list_items.py b/src/list_items.py index 0100307..386268e 100644 --- a/src/list_items.py +++ b/src/list_items.py @@ -138,7 +138,7 @@ class FileTransferItem(QtGui.QListWidget): def __init__(self, file_name, size, time, user, friend_number, file_number, state, parent=None): QtGui.QListWidget.__init__(self, parent) - self.resize(QtCore.QSize(600, 50)) + self.resize(QtCore.QSize(620, 50)) if state != FILE_TRANSFER_MESSAGE_STATUS['CANCELLED']: self.setStyleSheet('QWidget { background-color: green; }') else: @@ -152,16 +152,14 @@ class FileTransferItem(QtGui.QListWidget): font.setPointSize(11) font.setBold(True) self.name.setFont(font) - self.name.setObjectName("name") self.name.setText(user if len(user) <= 14 else user[:11] + '...') self.name.setStyleSheet('QLabel { color: black; }') self.time = QtGui.QLabel(self) - self.time.setGeometry(QtCore.QRect(550, 2, 50, 46)) + self.time.setGeometry(QtCore.QRect(570, 2, 50, 46)) font.setPointSize(10) font.setBold(False) self.time.setFont(font) - self.time.setObjectName("time") self.time.setText(convert_time(time)) self.time.setStyleSheet('QLabel { color: black; }') @@ -173,6 +171,7 @@ class FileTransferItem(QtGui.QListWidget): self.cancel.setIconSize(QtCore.QSize(30, 30)) self.cancel.setVisible(state > 1) self.cancel.clicked.connect(lambda: self.cancel_transfer(friend_number, file_number)) + self.cancel.setStyleSheet('QPushButton:hover { border: 1px solid #3A3939; }') self.accept = QtGui.QPushButton(self) self.accept.setGeometry(QtCore.QRect(450, 2, 46, 46)) @@ -182,10 +181,12 @@ class FileTransferItem(QtGui.QListWidget): self.accept.setIconSize(QtCore.QSize(30, 30)) self.accept.clicked.connect(lambda: self.accept_transfer(friend_number, file_number, size)) self.accept.setVisible(state == FILE_TRANSFER_MESSAGE_STATUS['INCOMING_NOT_STARTED']) + self.accept.setStyleSheet('QPushButton:hover { border: 1px solid #3A3939; }') self.pb = QtGui.QProgressBar(self) self.pb.setGeometry(QtCore.QRect(100, 15, 100, 20)) self.pb.setValue(0) + self.pb.setStyleSheet('QProgressBar { background-color: #302F2F; }') if state < 2: self.pb.setVisible(False) @@ -193,7 +194,6 @@ class FileTransferItem(QtGui.QListWidget): self.file_name.setGeometry(QtCore.QRect(210, 2, 230, 46)) font.setPointSize(12) self.file_name.setFont(font) - self.file_name.setObjectName("time") file_size = size / 1024 if not file_size: file_size = '{}B'.format(size) diff --git a/src/profile.py b/src/profile.py index 9ecafdc..a11e4ce 100644 --- a/src/profile.py +++ b/src/profile.py @@ -169,8 +169,9 @@ class Contact(object): avatar_path = 'avatar.png' os.chdir(curr_directory() + '/images/') pixmap = QtGui.QPixmap(QtCore.QSize(64, 64)) - pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio) - self._widget.avatar_label.setPixmap(avatar_path) + pixmap.load(avatar_path) + self._widget.avatar_label.setScaledContents(False) + self._widget.avatar_label.setPixmap(pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio)) self._widget.avatar_label.repaint() def reset_avatar(self): @@ -473,8 +474,9 @@ class Profile(Contact, Singleton): if not os.path.isfile(avatar_path): # load default image avatar_path = curr_directory() + '/images/avatar.png' pixmap = QtGui.QPixmap(QtCore.QSize(64, 64)) - pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio) - self._screen.account_avatar.setPixmap(avatar_path) + pixmap.load(avatar_path) + self._screen.account_avatar.setScaledContents(False) + self._screen.account_avatar.setPixmap(pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio)) self._screen.account_avatar.repaint() except: # no friend found. ignore log('Incorrect friend value: ' + str(value)) diff --git a/src/styles/style.qss b/src/styles/style.qss index 2b463ad..836f5de 100644 --- a/src/styles/style.qss +++ b/src/styles/style.qss @@ -22,16 +22,6 @@ * THE SOFTWARE. */ -QProgressBar:horizontal { - border: 1px solid #3A3939; - text-align: center; - padding: 1px; - background: #201F1F; -} -QProgressBar::chunk:horizontal { - background-color: qlineargradient(spread:reflect, x1:1, y1:0.545, x2:1, y2:0, stop:0 rgba(28, 66, 111, 255), stop:1 rgba(37, 87, 146, 255)); -} - QToolTip { border: 1px solid #3A3939; @@ -63,6 +53,16 @@ QWidget:item:selected background-color: #A9A9A9; } +QProgressBar:horizontal { + border: 1px solid #3A3939; + text-align: center; + padding: 1px; + background: #201F1F; +} +QProgressBar::chunk:horizontal { + background-color: qlineargradient(spread:reflect, x1:1, y1:0.545, x2:1, y2:0, stop:0 rgba(28, 66, 111, 255), stop:1 rgba(37, 87, 146, 255)); +} + QCheckBox { spacing: 5px; @@ -1267,5 +1267,4 @@ QPushButton:hover #toxygen { color: #A9A9A9; -} - +} \ No newline at end of file