fixes
This commit is contained in:
parent
e2c4c9f7e8
commit
0c10fe5e17
2 changed files with 4 additions and 10 deletions
|
|
@ -299,7 +299,6 @@ class ContactProfile(QWidget):
|
||||||
if self.displayed_photo_idx >= len(self.contact.photos):
|
if self.displayed_photo_idx >= len(self.contact.photos):
|
||||||
self.displayed_photo_idx = len(self.contact.photos) - 1
|
self.displayed_photo_idx = len(self.contact.photos) - 1
|
||||||
if self.displayed_photo_idx < 0:
|
if self.displayed_photo_idx < 0:
|
||||||
self.ui.photoLabel.setPixmap(None)
|
|
||||||
self.ui.photoUrlLabel.setText('')
|
self.ui.photoUrlLabel.setText('')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -315,8 +314,6 @@ class ContactProfile(QWidget):
|
||||||
if photo.thumbnail_data:
|
if photo.thumbnail_data:
|
||||||
data = photo.thumbnail_data
|
data = photo.thumbnail_data
|
||||||
else:
|
else:
|
||||||
self.ui.photoLabel.setPixmap(None)
|
|
||||||
self.ui.photoLabel.setText('<i>Loading...</i>')
|
|
||||||
return
|
return
|
||||||
|
|
||||||
img = QImage.fromData(data)
|
img = QImage.fromData(data)
|
||||||
|
|
@ -325,7 +322,7 @@ class ContactProfile(QWidget):
|
||||||
self.ui.photoLabel.setPixmap(QPixmap.fromImage(img))
|
self.ui.photoLabel.setPixmap(QPixmap.fromImage(img))
|
||||||
if photo.url is not NotLoaded:
|
if photo.url is not NotLoaded:
|
||||||
text = '<a href="%s">%s</a>' % (photo.url, photo.url)
|
text = '<a href="%s">%s</a>' % (photo.url, photo.url)
|
||||||
if not photo.shown:
|
if photo.hidden:
|
||||||
text += '<br /><font color=#ff0000><i>(Hidden photo)</i></font>'
|
text += '<br /><font color=#ff0000><i>(Hidden photo)</i></font>'
|
||||||
self.ui.photoUrlLabel.setText(text)
|
self.ui.photoUrlLabel.setText(text)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,10 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="headFrame">
|
<widget class="QFrame" name="headFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue