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();
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)
// 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
// this by making it bold.
if (!hinted && address.isInSubnet(localnet)) {
QString format = "<b>%1</b>";
QString format = "<span style=\"color:#4285F4;\">%1</span>";
result.append(format.arg(address.toString()));
hinted = true;
}
@ -1374,7 +1374,7 @@ void MainWindow::windowStateChanged()
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();
}

View File

@ -107,62 +107,10 @@
</widget>
</item>
<item>
<widget class="QWidget" name="m_pWidgetIPAddress" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QLabel" name="m_pLabelIpAddresses">
<property name="text">
<string notr="true">This computers IP addresses:</string>
</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>
</item>
<item>