Use ElidedLabel on PeerItem to not stretch the widget

* Use ElidedLabel on PeerItem to not stretch the widget
This commit is contained in:
defnax 2023-05-12 20:41:27 +02:00
parent 77d275c7f0
commit f54be58088

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>476</width>
<height>262</height>
<height>283</height>
</rect>
</property>
<property name="autoFillBackground">
@ -59,6 +59,9 @@
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatar" native="true">
<property name="minimumSize">
@ -75,90 +78,11 @@
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="peerName_GL">
<item row="0" column="0">
<widget class="QLabel" name="peerNameLabel">
<property name="font">
<font>
<pointsize>17</pointsize>
</font>
</property>
<property name="text">
<string notr="true">Peer Name</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Connected</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="last_HL">
<item>
<spacer name="last_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>190</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lastLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" colspan="2">
<item row="1" column="1" colspan="4">
<layout class="QHBoxLayout" name="buttons_HL">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QToolButton" name="sendmsgButton">
<property name="focusPolicy">
@ -266,6 +190,87 @@
</item>
</layout>
</item>
<item row="0" column="1" colspan="4">
<layout class="QGridLayout" name="peerName_GL">
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="0" column="2">
<widget class="QLabel" name="lastLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="ElidedLabel" name="peerNameLabel">
<property name="font">
<font>
<pointsize>17</pointsize>
</font>
</property>
<property name="text">
<string notr="true">Peer Name</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="last_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>190</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="ElidedLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Connected</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -526,6 +531,12 @@
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/ElidedLabel.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../icons.qrc"/>