Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/URLEdit.cpp')
-rw-r--r--src/gui/URLEdit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/URLEdit.cpp b/src/gui/URLEdit.cpp
index 428a918db..4880b6221 100644
--- a/src/gui/URLEdit.cpp
+++ b/src/gui/URLEdit.cpp
@@ -24,8 +24,7 @@
#include "core/Resources.h"
#include "core/Tools.h"
#include "gui/Font.h"
-
-const QColor URLEdit::ErrorColor = QColor(255, 125, 125);
+#include "gui/styles/StateColorPalette.h"
URLEdit::URLEdit(QWidget* parent)
: QLineEdit(parent)
@@ -50,7 +49,9 @@ void URLEdit::updateStylesheet()
const QString stylesheetTemplate("QLineEdit { background: %1; }");
if (!Tools::checkUrlValid(text())) {
- setStyleSheet(stylesheetTemplate.arg(ErrorColor.name()));
+ StateColorPalette statePalette;
+ QColor color = statePalette.color(StateColorPalette::ColorRole::Error);
+ setStyleSheet(stylesheetTemplate.arg(color.name()));
m_errorAction->setVisible(true);
} else {
m_errorAction->setVisible(false);