托盘ui微调 翻译文件
This commit is contained in:
parent
c87184a139
commit
e46ba714e1
Binary file not shown.
|
@ -43,7 +43,7 @@ using namespace kdk;
|
||||||
#define MAIN_LAYOUT_SPACING 0
|
#define MAIN_LAYOUT_SPACING 0
|
||||||
#define TITLE_FRAME_HEIGHT 60 //TabWidget的tab和widget有间隙,和设计稿看起来一致就不能设为设计稿里的高度
|
#define TITLE_FRAME_HEIGHT 60 //TabWidget的tab和widget有间隙,和设计稿看起来一致就不能设为设计稿里的高度
|
||||||
#define TITLE_LAYOUT_MARGINS 24,0,24,0
|
#define TITLE_LAYOUT_MARGINS 24,0,24,0
|
||||||
#define NET_LAYOUT_MARGINS 8,8,8,8
|
#define NET_LAYOUT_MARGINS 8,8,0,8
|
||||||
#define TEXT_HEIGHT 20
|
#define TEXT_HEIGHT 20
|
||||||
#define SETTINGS_LAYOUT_MARGINS 23,0,24,0
|
#define SETTINGS_LAYOUT_MARGINS 23,0,24,0
|
||||||
|
|
||||||
|
|
|
@ -147,11 +147,7 @@ void VpnPage::constructItemArea()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_listWidget->count() <= MAX_ITEMS) {
|
resetListWidgetWidth();
|
||||||
m_listFrame->setFixedWidth(MIN_WIDTH);
|
|
||||||
} else {
|
|
||||||
m_listFrame->setFixedWidth(MAX_WIDTH);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VpnPage::initVpnArea()
|
void VpnPage::initVpnArea()
|
||||||
|
@ -174,14 +170,6 @@ void VpnPage::resetPageHeight()
|
||||||
m_listFrame->show();
|
m_listFrame->show();
|
||||||
m_netDivider->show();
|
m_netDivider->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < m_mainLayout->count(); i ++) {
|
|
||||||
QWidget *w = m_mainLayout->itemAt(i)->widget();
|
|
||||||
if (w != nullptr && w->isHidden() != true) {
|
|
||||||
height += w->height();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this->setFixedHeight(height + PAGE_SPACE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VpnPage::removeConnectionItem(QMap<QString, QListWidgetItem *> &connectMap,
|
bool VpnPage::removeConnectionItem(QMap<QString, QListWidgetItem *> &connectMap,
|
||||||
|
@ -203,9 +191,7 @@ bool VpnPage::removeConnectionItem(QMap<QString, QListWidgetItem *> &connectMap,
|
||||||
p_listWidgetItem = nullptr;
|
p_listWidgetItem = nullptr;
|
||||||
|
|
||||||
iter = connectMap.erase(iter);
|
iter = connectMap.erase(iter);
|
||||||
if (m_listWidget->count() <= MAX_ITEMS) {
|
resetListWidgetWidth();
|
||||||
m_listFrame->setFixedWidth(MIN_WIDTH);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,9 +235,7 @@ void VpnPage::onAddConnection(QString uuid) //新增一个有线
|
||||||
|
|
||||||
delete p_newItem;
|
delete p_newItem;
|
||||||
p_newItem = nullptr;
|
p_newItem = nullptr;
|
||||||
if (m_listWidget->count() >= MAX_ITEMS) {
|
resetListWidgetWidth();
|
||||||
m_listFrame->setFixedWidth(MAX_WIDTH);
|
|
||||||
}
|
|
||||||
resetPageHeight();
|
resetPageHeight();
|
||||||
resetWindowPosition();
|
resetWindowPosition();
|
||||||
this->update();
|
this->update();
|
||||||
|
@ -338,9 +322,8 @@ void VpnPage::updateActivatedConnectionArea(KyConnectItem *p_newItem)
|
||||||
deleteConnectionMapItem(m_activeItemMap, m_listWidget, p_newItem->m_connectUuid);
|
deleteConnectionMapItem(m_activeItemMap, m_listWidget, p_newItem->m_connectUuid);
|
||||||
QListWidgetItem *p_listWidgetItem = addNewItem(p_newItem, m_listWidget);
|
QListWidgetItem *p_listWidgetItem = addNewItem(p_newItem, m_listWidget);
|
||||||
m_activeItemMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
m_activeItemMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
||||||
if (m_listWidget->count() <= MAX_ITEMS) {
|
|
||||||
m_listFrame->setFixedWidth(MIN_WIDTH);
|
resetListWidgetWidth();
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -356,11 +339,7 @@ void VpnPage::updateConnectionArea(KyConnectItem *p_newItem)
|
||||||
QListWidgetItem *p_listWidgetItem = insertNewItem(p_newItem, m_listWidget);
|
QListWidgetItem *p_listWidgetItem = insertNewItem(p_newItem, m_listWidget);
|
||||||
m_vpnItemMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
m_vpnItemMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
||||||
|
|
||||||
if (m_listWidget->count() <= MAX_ITEMS) {
|
resetListWidgetWidth();
|
||||||
m_listFrame->setFixedWidth(MIN_WIDTH);
|
|
||||||
} else {
|
|
||||||
m_listFrame->setFixedWidth(MAX_WIDTH);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VpnPage::updateConnectionState(QMap<QString, QListWidgetItem *> &connectMap,
|
void VpnPage::updateConnectionState(QMap<QString, QListWidgetItem *> &connectMap,
|
||||||
|
@ -700,3 +679,12 @@ void VpnPage::resetWindowPosition()
|
||||||
kdk::WindowManager::setGeometry(this->windowHandle(), rect);
|
kdk::WindowManager::setGeometry(this->windowHandle(), rect);
|
||||||
qDebug() << " Position of ukui-panel is " << position << "; Position of mainwindow is " << this->geometry() << "." << Q_FUNC_INFO << __LINE__;
|
qDebug() << " Position of ukui-panel is " << position << "; Position of mainwindow is " << this->geometry() << "." << Q_FUNC_INFO << __LINE__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VpnPage::resetListWidgetWidth()
|
||||||
|
{
|
||||||
|
if (m_listWidget->count() <= MAX_ITEMS) {
|
||||||
|
m_listFrame->setFixedWidth(MIN_WIDTH);
|
||||||
|
} else {
|
||||||
|
m_listFrame->setFixedWidth(MAX_WIDTH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ private:
|
||||||
QListWidget *vpnListWidget, QString uuid);
|
QListWidget *vpnListWidget, QString uuid);
|
||||||
|
|
||||||
void resetWindowPosition();
|
void resetWindowPosition();
|
||||||
|
void resetListWidgetWidth();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void vpnAdd(QStringList info);
|
void vpnAdd(QStringList info);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<クdハ<>箆!ソ`。スン
|
|
@ -80,6 +80,26 @@
|
||||||
<source>VPN Server</source>
|
<source>VPN Server</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="12"/>
|
||||||
|
<source>VPN</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="41"/>
|
||||||
|
<source>Auto Connection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="53"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="56"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vpnConfigPage</name>
|
<name>vpnConfigPage</name>
|
||||||
|
@ -90,7 +110,7 @@
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vpnDetail</name>
|
<name>VpnDetail</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/vpndetails/vpndetail.cpp" line="15"/>
|
<location filename="../frontend/vpndetails/vpndetail.cpp" line="15"/>
|
||||||
<location filename="../frontend/vpndetails/vpndetail.cpp" line="27"/>
|
<location filename="../frontend/vpndetails/vpndetail.cpp" line="27"/>
|
||||||
|
@ -113,29 +133,6 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>vpnDetailPage</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="12"/>
|
|
||||||
<source>VPN</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="41"/>
|
|
||||||
<source>Auto Connection</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="53"/>
|
|
||||||
<source>Confirm</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="56"/>
|
|
||||||
<source>Cancel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>vpnObject</name>
|
<name>vpnObject</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
Binary file not shown.
|
@ -756,6 +756,26 @@ If key direction is used, it must be opposite to the VPN side used. If '1&a
|
||||||
<source>VPN Server</source>
|
<source>VPN Server</source>
|
||||||
<translation>服务器地址</translation>
|
<translation>服务器地址</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="12"/>
|
||||||
|
<source>VPN</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="41"/>
|
||||||
|
<source>Auto Connection</source>
|
||||||
|
<translation>自动连接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="53"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>确定</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="56"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>取消</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vpnConfigPage</name>
|
<name>vpnConfigPage</name>
|
||||||
|
@ -765,7 +785,7 @@ If key direction is used, it must be opposite to the VPN side used. If '1&a
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vpnDetail</name>
|
<name>VpnDetail</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/vpndetails/vpndetail.cpp" line="61"/>
|
<location filename="../frontend/vpndetails/vpndetail.cpp" line="61"/>
|
||||||
<location filename="../frontend/vpndetails/vpndetail.cpp" line="145"/>
|
<location filename="../frontend/vpndetails/vpndetail.cpp" line="145"/>
|
||||||
|
@ -804,29 +824,6 @@ If key direction is used, it must be opposite to the VPN side used. If '1&a
|
||||||
<translation>确定</translation>
|
<translation>确定</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>vpnDetailPage</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="12"/>
|
|
||||||
<source>VPN</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="41"/>
|
|
||||||
<source>Auto Connection</source>
|
|
||||||
<translation>自动连接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="53"/>
|
|
||||||
<source>Confirm</source>
|
|
||||||
<translation>确定</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="56"/>
|
|
||||||
<source>Cancel</source>
|
|
||||||
<translation>取消</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>vpnObject</name>
|
<name>vpnObject</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
Loading…
Reference in New Issue