Skip to content

Commit c8d3c18

Browse files
committed
fix secure lock sign and popup window height
1 parent c69bf44 commit c8d3c18

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Diff for: keychain_win/keychain_gui/src/PopupWindow.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ PopupWindow::PopupWindow(const KeychainWarningMessage wMessage, QWidget *parent)
1919
body->setWordWrap(true);
2020
body->setStyleSheet("background:transparent;border-width:0;color:rgb(147,148,151);font:14px \"Segoe UI\";padding:10px;");
2121

22-
2322
QFont myFont= body->font();
2423
int mCount = wMessage.MessgeCount();
2524
QString messageStr = wMessage.GetMessage();
@@ -30,12 +29,12 @@ PopupWindow::PopupWindow(const KeychainWarningMessage wMessage, QWidget *parent)
3029

3130
int strWidth = fm.width(messageStr);
3231
int strHeight = k+k/2;
33-
int numLines = std::ceil(strWidth / 350.0)+((mCount>1)?((mCount-1)*2):1);
32+
int numLines = std::ceil(strWidth / 330.0)+((mCount>1)?((mCount-1)*2):0);
3433

3534

3635
body->setText(messageStr);
37-
body->setFixedHeight(strHeight*numLines+20);
38-
this->setFixedHeight(body->height()+10);
36+
body->setFixedHeight(strHeight*numLines+15);
37+
this->setFixedHeight(body->height());
3938

4039
body->setAlignment(Qt::AlignJustify);
4140
if (wMessage.isWarn()==false) {

Diff for: keychain_win/keychain_gui/src/keychain_gui_win.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ keychain_gui_win::keychain_gui_win(Transaction &transaction, QWidget *parent)
160160
QString lang = QGuiApplication::inputMethod()->locale().languageToString(QGuiApplication::inputMethod()->locale().language());
161161
languageLabel->setText(lang.mid(0, 2).toUpper());
162162
}
163-
if (!transaction.isCreatePassword() && warningMessage.isWarn()) {
163+
//if (!transaction.isCreatePassword() && warningMessage.isWarn()) {
164164
lockIcon = new LockIcon(warningMessage, this);
165165
popupWindow = new PopupWindow(warningMessage, this);
166166
popupWindow->setVisible(false);
@@ -171,7 +171,7 @@ keychain_gui_win::keychain_gui_win(Transaction &transaction, QWidget *parent)
171171
else
172172
lockIcon->move(width() - 55, 28);
173173
lockIcon->setMouseTracking(true);
174-
}
174+
//}
175175

176176
this->connect(OKButton, &QPushButton::released, this, &keychain_gui_win::transaction_sign);
177177
this->connect(CancelButton, &QPushButton::released, this, &keychain_gui_win::cancel_sign);

0 commit comments

Comments
 (0)