Gui: fix default color of report view messages in preferences

This commit is contained in:
0penBrain
2022-10-03 14:49:30 +02:00
committed by Chris Hennes
parent fce72e46c8
commit c168aec824
2 changed files with 2 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ DlgReportViewImp::DlgReportViewImp( QWidget* parent )
, ui(new Ui_DlgReportView)
{
ui->setupUi(this);
ui->colorText->setColor(qApp->palette().windowText().color());
}
/**

View File

@@ -526,7 +526,7 @@ bool ReportOutput::event(QEvent* event)
void ReportOutput::changeEvent(QEvent *ev)
{
if (ev->type() == QEvent::StyleChange) {
QPalette pal = palette();
QPalette pal = qApp->palette();
QColor color = pal.windowText().color();
unsigned int text = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);
auto value = static_cast<unsigned long>(text);