SYNERGY-936 Fixed gaps in IPs

This commit is contained in:
Serhii Hadzhilov 2021-04-29 13:07:53 +03:00
parent ffe44549ac
commit 0aa403e6e2
2 changed files with 6 additions and 58 deletions

View file

@ -132,7 +132,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
updateScreenName(); updateScreenName();
connect(m_AppConfig, SIGNAL(screenNameChanged()), this, SLOT(updateScreenName())); connect(m_AppConfig, SIGNAL(screenNameChanged()), this, SLOT(updateScreenName()));
m_pLabelIpAddresses->setText(getIPAddresses()); m_pLabelIpAddresses->setText(tr("This computers IP addresses: %1").arg(getIPAddresses()));
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
// ipc must always be enabled, so that we can disable command when switching to desktop mode. // ipc must always be enabled, so that we can disable command when switching to desktop mode.
@ -1072,7 +1072,7 @@ QString MainWindow::getIPAddresses()
// usually 192.168.x.x is a useful ip for the user, so indicate // usually 192.168.x.x is a useful ip for the user, so indicate
// this by making it bold. // this by making it bold.
if (!hinted && address.isInSubnet(localnet)) { if (!hinted && address.isInSubnet(localnet)) {
QString format = "<b>%1</b>"; QString format = "<span style=\"color:#4285F4;\">%1</span>";
result.append(format.arg(address.toString())); result.append(format.arg(address.toString()));
hinted = true; hinted = true;
} }
@ -1374,7 +1374,7 @@ void MainWindow::windowStateChanged()
void MainWindow::updateScreenName() void MainWindow::updateScreenName()
{ {
m_pLabelComputerName->setText(tr("This computers name: %1 (<a href=\"#\" style=\"text-decoration: none; color:#007af4;\">Preferences</a>)").arg(appConfig().screenName())); m_pLabelComputerName->setText(tr("This computers name: %1 (<a href=\"#\" style=\"text-decoration: none;\">Preferences</a>)").arg(appConfig().screenName()));
serverConfig().updateServerName(); serverConfig().updateServerName();
} }

View file

@ -107,62 +107,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="m_pWidgetIPAddress" native="true"> <widget class="QLabel" name="m_pLabelIpAddresses">
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <string notr="true">This computers IP addresses:</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>190</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>This computers IP addresses:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="m_pLabelIpAddresses">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>