refactor: use crimson for the error color
This commit is contained in:
parent
1855d33e1f
commit
949913cd6e
2 changed files with 3 additions and 9 deletions
|
|
@ -7,14 +7,10 @@
|
||||||
|
|
||||||
#include "LineEditValidator.h"
|
#include "LineEditValidator.h"
|
||||||
|
|
||||||
#include "gui/Styles.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QValidator>
|
#include <QValidator>
|
||||||
|
|
||||||
using namespace deskflow::gui;
|
|
||||||
|
|
||||||
namespace validators {
|
namespace validators {
|
||||||
|
|
||||||
LineEditValidator::LineEditValidator(QLineEdit *lineEdit, ValidationError *error)
|
LineEditValidator::LineEditValidator(QLineEdit *lineEdit, ValidationError *error)
|
||||||
|
|
@ -63,10 +59,10 @@ QValidator::State LineEditValidator::validate(QString &input, int &) const
|
||||||
padVer = 1;
|
padVer = 1;
|
||||||
padHor = 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(
|
.arg(
|
||||||
QString::number(radius), QString::number(padVer), QString::number(padHor),
|
QString::number(radius), QString::number(padVer), QString::number(padHor),
|
||||||
QString::number(borderWidth), kColorError
|
QString::number(borderWidth)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
#include "ValidationError.h"
|
#include "ValidationError.h"
|
||||||
|
|
||||||
#include "gui/Styles.h"
|
|
||||||
|
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
|
||||||
namespace validators {
|
namespace validators {
|
||||||
|
|
@ -23,7 +21,7 @@ ValidationError::ValidationError(QObject *parent, QLabel *label) : QObject(paren
|
||||||
|
|
||||||
auto palette = m_label->palette();
|
auto palette = m_label->palette();
|
||||||
palette.setColor(QPalette::WindowText, Qt::white);
|
palette.setColor(QPalette::WindowText, Qt::white);
|
||||||
palette.setColor(QPalette::Window, deskflow::gui::kColorError);
|
palette.setColor(QPalette::Window, QStringLiteral("crimson"));
|
||||||
m_label->setPalette(palette);
|
m_label->setPalette(palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue