Gui: use Color::asPackedRGB<QColor>()

This commit is contained in:
wmayer
2023-02-25 18:21:16 +01:00
committed by wwmayer
parent 41e6c17605
commit 7c359469ba
7 changed files with 44 additions and 39 deletions

View File

@@ -32,6 +32,7 @@
#endif
#include <Base/Interpreter.h>
#include <App/Color.h>
#include "ReportView.h"
#include "Application.h"
@@ -528,7 +529,7 @@ void ReportOutput::changeEvent(QEvent *ev)
if (ev->type() == QEvent::StyleChange) {
QPalette pal = qApp->palette();
QColor color = pal.windowText().color();
unsigned int text = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);
unsigned int text = App::Color::asPackedRGB<QColor>(color);
auto value = static_cast<unsigned long>(text);
// if this parameter is not already set use the style's window text color
value = getWindowParameter()->GetUnsigned("colorText", value);