diff --git a/res.qrc b/res.qrc index 5edb06960..c357773f6 100644 --- a/res.qrc +++ b/res.qrc @@ -55,6 +55,7 @@ ui/chatForm/buttons.css ui/chatForm/fullScreenButtons.css ui/chatForm/callButton.svg + ui/chatForm/labels.css ui/chatForm/micButton.svg ui/chatForm/micButtonRed.svg ui/chatForm/videoButton.svg diff --git a/src/widget/form/searchsettingsform.cpp b/src/widget/form/searchsettingsform.cpp index 20507e715..628ae1108 100644 --- a/src/widget/form/searchsettingsform.cpp +++ b/src/widget/form/searchsettingsform.cpp @@ -16,7 +16,7 @@ SearchSettingsForm::SearchSettingsForm(QWidget *parent) : ui->choiceDateButton->setObjectName(QStringLiteral("choiceDateButton")); ui->choiceDateButton->setStyleSheet(Style::getStylesheet(QStringLiteral(":/ui/chatForm/buttons.css"))); - ui->startDateLabel->setStyleSheet(QStringLiteral("QLabel{color: #ddd;}")); // TODO: need use a style file (.css) + ui->startDateLabel->setStyleSheet(Style::getStylesheet(QStringLiteral(":/ui/chatForm/labels.css"))); connect(ui->startSearchComboBox, static_cast(&QComboBox::currentIndexChanged), this, &SearchSettingsForm::onStartSearchSelected); @@ -94,8 +94,6 @@ void SearchSettingsForm::onStartSearchSelected(const int index) ui->choiceDateButton->setProperty("state", QStringLiteral("green")); ui->choiceDateButton->setStyleSheet(Style::getStylesheet(QStringLiteral(":/ui/chatForm/buttons.css"))); - ui->startDateLabel->setStyleSheet(QStringLiteral("QLabel{color: #000;}")); - if (startDate.isNull()) { startDate = QDate::currentDate(); updateStartDateLabel(); @@ -107,8 +105,6 @@ void SearchSettingsForm::onStartSearchSelected(const int index) ui->choiceDateButton->setProperty("state", QString()); ui->choiceDateButton->setStyleSheet(Style::getStylesheet(QStringLiteral(":/ui/chatForm/buttons.css"))); - - ui->startDateLabel->setStyleSheet(QStringLiteral("QLabel{color: #ddd;}")); } setUpdate(true); diff --git a/ui/chatForm/labels.css b/ui/chatForm/labels.css new file mode 100644 index 000000000..ec14e05d2 --- /dev/null +++ b/ui/chatForm/labels.css @@ -0,0 +1,9 @@ +QLabel +{ + color: #000; +} + +QLabel:disabled +{ + color: #ddd; +}