mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
using ElideLabel for RS id
This commit is contained in:
parent
8d2a8f8ced
commit
c0e8502cbf
@ -202,6 +202,24 @@ void HomePage::updateOwnId()
|
|||||||
|
|
||||||
rsPeers->getShortInvite(invite,rsPeers->getOwnId(),true,!include_extra_locators);
|
rsPeers->getShortInvite(invite,rsPeers->getOwnId(),true,!include_extra_locators);
|
||||||
|
|
||||||
|
#ifdef TODO
|
||||||
|
QString S;
|
||||||
|
QString txt;
|
||||||
|
int i=0;
|
||||||
|
|
||||||
|
for(uint32_t i=0;i<invite.size();)
|
||||||
|
if(QFontMetricsF(font()).width(S) < ui->retroshareid->width())
|
||||||
|
S += invite[i++];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txt += S + "\n";
|
||||||
|
S.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
txt += S;
|
||||||
|
|
||||||
|
ui->retroshareid->setText(txt);
|
||||||
|
#endif
|
||||||
ui->retroshareid->setText(QString::fromUtf8(invite.c_str()));
|
ui->retroshareid->setText(QString::fromUtf8(invite.c_str()));
|
||||||
}
|
}
|
||||||
static void sendMail(QString sAddress, QString sSubject, QString sBody)
|
static void sendMail(QString sAddress, QString sSubject, QString sBody)
|
||||||
|
@ -186,22 +186,16 @@ private and secure decentralized communication platform.
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QToolButton" name="shareButton">
|
<widget class="QToolButton" name="expandButton">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Share your RetroShare ID</p></body></html></string>
|
<string>Show full certificate (old format)</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="icons.qrc">
|
<iconset resource="icons.qrc">
|
||||||
<normaloff>:/icons/svg/share.svg</normaloff>:/icons/svg/share.svg</iconset>
|
<normaloff>:/icons/png/cert.png</normaloff>:/icons/png/cert.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@ -209,8 +203,8 @@ private and secure decentralized communication platform.
|
|||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="popupMode">
|
<property name="checkable">
|
||||||
<enum>QToolButton::InstantPopup</enum>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -218,7 +212,7 @@ private and secure decentralized communication platform.
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="retroshareid">
|
<widget class="ElidedLabel" name="retroshareid">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
@ -240,7 +234,28 @@ private and secure decentralized communication platform.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="5">
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="userCertLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>This is your Retroshare ID. Copy and share with your friends!</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="6">
|
||||||
<widget class="QPlainTextEdit" name="userCertEdit">
|
<widget class="QPlainTextEdit" name="userCertEdit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@ -276,38 +291,23 @@ private and secure decentralized communication platform.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="1" column="3">
|
||||||
<widget class="QLabel" name="userCertLabel">
|
<widget class="QToolButton" name="shareButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="focusPolicy">
|
||||||
<font>
|
<enum>Qt::NoFocus</enum>
|
||||||
<pointsize>11</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string>This is your Retroshare ID. Copy and share with your friends!</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QToolButton" name="expandButton">
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Show full certificate (old format)</string>
|
<string><html><head/><body><p>Share your RetroShare ID</p></body></html></string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="icons.qrc">
|
<iconset resource="icons.qrc">
|
||||||
<normaloff>:/icons/png/cert.png</normaloff>:/icons/png/cert.png</iconset>
|
<normaloff>:/icons/svg/share.svg</normaloff>:/icons/svg/share.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@ -315,8 +315,8 @@ private and secure decentralized communication platform.
|
|||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="popupMode">
|
||||||
<bool>true</bool>
|
<enum>QToolButton::InstantPopup</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -340,6 +340,14 @@ private and secure decentralized communication platform.
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>ElidedLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header location="global">gui/common/ElidedLabel.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc"/>
|
<include location="icons.qrc"/>
|
||||||
<include location="images.qrc"/>
|
<include location="images.qrc"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user