SYNERGY-936 Fix a gap between label and computer name

This commit is contained in:
Serhii Hadzhilov 2021-04-29 11:40:37 +03:00
parent a84402b590
commit ffe44549ac
3 changed files with 18 additions and 123 deletions

View File

@ -130,7 +130,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
m_pWidgetUpdate->hide();
m_VersionChecker.setApp(appPath(appConfig.synergycName()));
m_pLabelScreenName->setText(appConfig.screenName());
updateScreenName();
connect(m_AppConfig, SIGNAL(screenNameChanged()), this, SLOT(updateScreenName()));
m_pLabelIpAddresses->setText(getIPAddresses());
@ -1351,7 +1351,7 @@ void MainWindow::secureSocket(bool secureSocket)
}
}
void MainWindow::on_m_pSettingsLink_linkActivated(const QString&)
void MainWindow::on_m_pLabelComputerName_linkActivated(const QString&)
{
m_pActionSettings->trigger();
}
@ -1374,7 +1374,7 @@ void MainWindow::windowStateChanged()
void MainWindow::updateScreenName()
{
m_pLabelScreenName->setText(appConfig().screenName());
m_pLabelComputerName->setText(tr("This computers name: %1 (<a href=\"#\" style=\"text-decoration: none; color:#007af4;\">Preferences</a>)").arg(appConfig().screenName()));
serverConfig().updateServerName();
}

View File

@ -252,7 +252,7 @@ private slots:
void on_m_pButtonApply_clicked();
void on_windowShown();
void on_m_pSettingsLink_linkActivated(const QString &link);
void on_m_pLabelComputerName_linkActivated(const QString &link);
void on_m_pLabelFingerprint_linkActivated(const QString& link);
void on_m_pComboServerList_currentIndexChanged(const QString &arg1);

View File

@ -82,133 +82,28 @@
</widget>
</item>
<item>
<widget class="QWidget" name="m_pWidgetComputerName" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QLabel" name="m_pLabelComputerName">
<property name="minimumSize">
<size>
<width>582</width>
<height>15</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
<width>65535</width>
<height>65535</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<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="m_pLabelComputerName">
<property name="minimumSize">
<size>
<width>135</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>135</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<family>Arial</family>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>This computers name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="m_pLabelScreenName">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="m_pSettingsLink">
<property name="minimumSize">
<size>
<width>0</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<family>Arial</family>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style=&quot;margin-left: 5px;&quot;&gt;(&lt;a href=&quot;#&quot;&gt;&lt;span style=&quot; text-decoration: none; font-size: 13px; color:#007af4;&quot;&gt;Preferences&lt;/span&gt;&lt;/a&gt;)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
</layout>
<property name="font">
<font>
<family>Arial</family>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string notr="true">This computers name:</string>
</property>
</widget>
</item>
<item>