Gui: use Color::asPackedRGB<QColor>()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user