diff --git a/src/w_PrefrencesWindow.cpp b/src/w_PrefrencesWindow.cpp index ba20b69c..24a6eb3e 100644 --- a/src/w_PrefrencesWindow.cpp +++ b/src/w_PrefrencesWindow.cpp @@ -17,43 +17,43 @@ PrefrencesWindow::PrefrencesWindow(QWidget *parent) : QDialog(parent), ui->qvVersion->setText(QV2RAY_VERSION_STRING); CurrentConfig = GetGlobalConfig(); // - ui->languageComboBox->setCurrentText(QString::fromStdString(CurrentConfig.language)); + ui->languageComboBox->setCurrentText(QSTRING(CurrentConfig.language)); ui->logLevelComboBox->setCurrentIndex(CurrentConfig.logLevel); ui->runAsRootCheckBox->setChecked(CurrentConfig.runAsRoot); // // - ui->listenIPTxt->setText(QString::fromStdString(CurrentConfig.inBoundSettings.listenip)); + ui->listenIPTxt->setText(QSTRING(CurrentConfig.inBoundSettings.listenip)); // bool have_http = CurrentConfig.inBoundSettings.http_port != 0; ui->httpCB->setChecked(have_http); - ui->httpPortLE->setText(QString::fromStdString(to_string(CurrentConfig.inBoundSettings.http_port))); + ui->httpPortLE->setText(QSTRING(to_string(CurrentConfig.inBoundSettings.http_port))); ui->httpAuthCB->setChecked(CurrentConfig.inBoundSettings.http_useAuth); // ui->httpAuthCB->setEnabled(have_http); ui->httpAuthCB->setChecked(CurrentConfig.inBoundSettings.http_useAuth); ui->httpAuthUsernameTxt->setEnabled(have_http && CurrentConfig.inBoundSettings.http_useAuth); ui->httpAuthPasswordTxt->setEnabled(have_http && CurrentConfig.inBoundSettings.http_useAuth); - ui->httpAuthUsernameTxt->setText(QString::fromStdString(CurrentConfig.inBoundSettings.httpAccount.user)); - ui->httpAuthPasswordTxt->setText(QString::fromStdString(CurrentConfig.inBoundSettings.httpAccount.pass)); + ui->httpAuthUsernameTxt->setText(QSTRING(CurrentConfig.inBoundSettings.httpAccount.user)); + ui->httpAuthPasswordTxt->setText(QSTRING(CurrentConfig.inBoundSettings.httpAccount.pass)); ui->httpPortLE->setValidator(new QIntValidator()); // // bool have_socks = CurrentConfig.inBoundSettings.socks_port != 0; ui->socksCB->setChecked(have_socks); - ui->socksPortLE->setText(QString::fromStdString(to_string(CurrentConfig.inBoundSettings.socks_port))); + ui->socksPortLE->setText(QSTRING(to_string(CurrentConfig.inBoundSettings.socks_port))); ui->socksAuthCB->setChecked(CurrentConfig.inBoundSettings.socks_useAuth); // ui->socksAuthCB->setEnabled(have_socks); ui->socksAuthCB->setChecked(CurrentConfig.inBoundSettings.socks_useAuth); ui->socksAuthUsernameTxt->setEnabled(have_socks && CurrentConfig.inBoundSettings.socks_useAuth); ui->socksAuthPasswordTxt->setEnabled(have_socks && CurrentConfig.inBoundSettings.socks_useAuth); - ui->socksAuthUsernameTxt->setText(QString::fromStdString(CurrentConfig.inBoundSettings.socksAccount.user)); - ui->socksAuthPasswordTxt->setText(QString::fromStdString(CurrentConfig.inBoundSettings.socksAccount.pass)); + ui->socksAuthUsernameTxt->setText(QSTRING(CurrentConfig.inBoundSettings.socksAccount.user)); + ui->socksAuthPasswordTxt->setText(QSTRING(CurrentConfig.inBoundSettings.socksAccount.pass)); ui->socksPortLE->setValidator(new QIntValidator()); // // - ui->vCoreExePathTxt->setText(QString::fromStdString(CurrentConfig.v2CorePath)); - ui->vCoreAssetsPathTxt->setText(QString::fromStdString(CurrentConfig.v2AssetsPath)); + ui->vCoreExePathTxt->setText(QSTRING(CurrentConfig.v2CorePath)); + ui->vCoreAssetsPathTxt->setText(QSTRING(CurrentConfig.v2AssetsPath)); // // ui->muxEnabledCB->setChecked(CurrentConfig.mux.enabled); @@ -74,11 +74,12 @@ PrefrencesWindow::PrefrencesWindow(QWidget *parent) : QDialog(parent), } foreach (auto connection, CurrentConfig.configs) { - ui->autoStartCombo->addItem(QString::fromStdString(connection)); + ui->autoStartCombo->addItem(QSTRING(connection)); } - ui->autoStartCombo->setCurrentText(QString::fromStdString(CurrentConfig.autoStartConfig)); + ui->autoStartCombo->setCurrentText(QSTRING(CurrentConfig.autoStartConfig)); ui->cancelIgnoreVersionBtn->setEnabled(CurrentConfig.ignoredVersion != ""); + ui->ignoredNextVersion->setText(QSTRING(CurrentConfig.ignoredVersion)); finishedLoading = true; } diff --git a/src/w_PrefrencesWindow.ui b/src/w_PrefrencesWindow.ui index 18d078a8..4ea82cf5 100644 --- a/src/w_PrefrencesWindow.ui +++ b/src/w_PrefrencesWindow.ui @@ -6,7 +6,7 @@ 0 0 - 700 + 709 370 @@ -25,8 +25,11 @@ + + QTabWidget::Rounded + - 0 + 4 @@ -727,6 +730,13 @@ + + + + + + + diff --git a/src/w_SubscribeEditor.ui b/src/w_SubscribeEditor.ui index 040a506e..c9a3c2a8 100644 --- a/src/w_SubscribeEditor.ui +++ b/src/w_SubscribeEditor.ui @@ -19,143 +19,184 @@ true - - - - - - - - - - 0 - 0 - - - - + - - - - - - - - 0 - 0 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - - - - #SubsGroupName - - - - - #SubsGroupURL - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - #ConfigList - - - - - - - - - - - - #ConfigDetail - - - - - - #Type - - - - - - - - - - - - - - #Server - - - - - - - - - - - - - - #Config - - - - - - - - - - + + + + 6 + 446 + 174 + 34 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 433 + 226 + 281 + 214 + + + + #ConfigDetail + + + + + + #Type + + + + + + + + + + + + + + #Server + + + + + + + + + + + + + + #Config + + + + + + + + + + #Port + + + + + + + + + 530 + 101 + 181 + 121 + + + + + + + 50 + 10 + 371 + 431 + + + + 0 + + + + #SubsGroupName + + + + + #SubsGroupURL + + + + + + + 8 + 10 + 34 + 361 + + + + + + + + 0 + 0 + + + + #AddConnection + + + A + + + + :/icons/add_connection_btn.png:/icons/add_connection_btn.png + + + + + + + + 0 + 0 + + + + #RemoveConnection + + + R + + + + :/icons/remove_connection_btn.png:/icons/remove_connection_btn.png + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - + + + buttonBox diff --git a/translations/zh-CN.ts b/translations/zh-CN.ts index c3f5e122..d0455473 100644 --- a/translations/zh-CN.ts +++ b/translations/zh-CN.ts @@ -198,12 +198,12 @@ #ReadBufferSize (MB) - 读取缓冲区大小 (MB) + 读取缓冲区 (MB) #WriteBufferSize (MB) - 写入缓冲区大小 (MB) + 写入缓冲区 (MB) @@ -214,13 +214,13 @@ #JsonPrettify - 美化 JSON + 格式化 JSON #JsonContainsError - JSON 格式错误 + JSON 包含语法错误