refactor: use crimson for the error color
This commit is contained in:
@ -7,14 +7,10 @@
|
||||
|
||||
#include "LineEditValidator.h"
|
||||
|
||||
#include "gui/Styles.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QStyle>
|
||||
#include <QValidator>
|
||||
|
||||
using namespace deskflow::gui;
|
||||
|
||||
namespace validators {
|
||||
|
||||
LineEditValidator::LineEditValidator(QLineEdit *lineEdit, ValidationError *error)
|
||||
@ -63,10 +59,10 @@ QValidator::State LineEditValidator::validate(QString &input, int &) const
|
||||
padVer = 1;
|
||||
padHor = 1;
|
||||
}
|
||||
m_pLineEdit->setStyleSheet(QStringLiteral("border-radius: %1px; padding: %2px %3px; border: %4px solid %5;")
|
||||
m_pLineEdit->setStyleSheet(QStringLiteral("border-radius: %1px; padding: %2px %3px; border: %4px solid crimson;")
|
||||
.arg(
|
||||
QString::number(radius), QString::number(padVer), QString::number(padHor),
|
||||
QString::number(borderWidth), kColorError
|
||||
QString::number(borderWidth)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
|
||||
#include "ValidationError.h"
|
||||
|
||||
#include "gui/Styles.h"
|
||||
|
||||
#include <QPalette>
|
||||
|
||||
namespace validators {
|
||||
@ -23,7 +21,7 @@ ValidationError::ValidationError(QObject *parent, QLabel *label) : QObject(paren
|
||||
|
||||
auto palette = m_label->palette();
|
||||
palette.setColor(QPalette::WindowText, Qt::white);
|
||||
palette.setColor(QPalette::Window, deskflow::gui::kColorError);
|
||||
palette.setColor(QPalette::Window, QStringLiteral("crimson"));
|
||||
m_label->setPalette(palette);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user