some bugs and corner cases
This commit is contained in:
parent
dd62f84acc
commit
0bcfd779b8
4 changed files with 44 additions and 6 deletions
|
@ -386,7 +386,11 @@ void Conversation::onClearButton()
|
|||
|
||||
void Conversation::setAvatar(const QString& path)
|
||||
{
|
||||
m_ui->avatar->setPixmap(path.size() == 0 ? Shared::iconPath("user", true) : path);
|
||||
if (path.size() == 0) {
|
||||
m_ui->avatar->setPixmap(Shared::icon("user", true).pixmap(QSize(50, 50)));
|
||||
} else {
|
||||
m_ui->avatar->setPixmap(path);
|
||||
}
|
||||
}
|
||||
|
||||
void Conversation::onAttachResize(const QSize& oldSize, const QSize& newSize)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>572</width>
|
||||
<height>485</height>
|
||||
<height>484</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
|
@ -95,11 +95,26 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusIcon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -149,18 +164,33 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue