mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
style: use css files for toxId
This commit is contained in:
parent
19f5df0a91
commit
d1715500f7
2
res.qrc
2
res.qrc
|
@ -105,6 +105,7 @@
|
|||
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
|
||||
<file>themes/dark/genericChatForm/genericChatForm.css</file>
|
||||
<file>themes/dark/acceptCall/acceptCall.svg</file>
|
||||
<file>themes/dark/addFriendForm/toxId.css</file>
|
||||
<file>themes/dark/rejectCall/rejectCall.svg</file>
|
||||
<file>themes/dark/notificationEdge/notificationEdge.css</file>
|
||||
<file>themes/dark/loginScreen/loginScreen.css</file>
|
||||
|
@ -169,6 +170,7 @@
|
|||
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
|
||||
<file>themes/default/genericChatForm/genericChatForm.css</file>
|
||||
<file>themes/default/acceptCall/acceptCall.svg</file>
|
||||
<file>themes/default/addFriendForm/toxId.css</file>
|
||||
<file>themes/default/rejectCall/rejectCall.svg</file>
|
||||
<file>img/login_logo.svg</file>
|
||||
<file>themes/default/notificationEdge/notificationEdge.css</file>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "src/widget/contentlayout.h"
|
||||
#include "src/widget/gui.h"
|
||||
#include "src/widget/tool/croppinglabel.h"
|
||||
#include "src/widget/style.h"
|
||||
#include "src/widget/translator.h"
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
@ -294,7 +295,7 @@ void AddFriendForm::onIdChanged(const QString& id)
|
|||
isValidId ? QStringLiteral("%1 (%2)") : QStringLiteral("%1 <font color='red'>(%2)</font>");
|
||||
toxIdLabel.setText(labelText.arg(toxIdText, toxIdComment));
|
||||
toxId.setStyleSheet(isValidOrEmpty ? QStringLiteral("")
|
||||
: QStringLiteral("QLineEdit { background-color: #FFC1C1; }"));
|
||||
: Style::getStylesheet("addFriendForm/toxId.css"));
|
||||
toxId.setToolTip(isValidOrEmpty ? QStringLiteral("") : tr("Invalid Tox ID format"));
|
||||
|
||||
sendButton.setEnabled(isValidId);
|
||||
|
|
3
themes/dark/addFriendForm/toxId.css
Normal file
3
themes/dark/addFriendForm/toxId.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
QLineEdit {
|
||||
background-color: #8a3f3a;
|
||||
}
|
3
themes/default/addFriendForm/toxId.css
Normal file
3
themes/default/addFriendForm/toxId.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
QLineEdit {
|
||||
background-color: #FFC1C1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user