From d2be60518734a9c55249f9f30374d93cee7d1dd0 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 1 Aug 2020 22:47:19 +0300 Subject: [PATCH] avoid temporaries in QStyle::standardPalette() Signed-off-by: Ivailo Monev --- src/gui/styles/qstyle.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp index 6ab4278aa..8e67c6261 100644 --- a/src/gui/styles/qstyle.cpp +++ b/src/gui/styles/qstyle.cpp @@ -2134,10 +2134,8 @@ QPalette QStyle::standardPalette() const #else QColor background(0xd4, 0xd0, 0xc8); // win 2000 grey #endif - QColor light(background.lighter()); QColor dark(background.darker()); - QColor mid(Qt::gray); - QPalette palette(Qt::black, background, light, dark, mid, Qt::black, Qt::white); + QPalette palette(Qt::black, background, background.lighter(), dark, Qt::gray, Qt::black, Qt::white); palette.setBrush(QPalette::Disabled, QPalette::WindowText, dark); palette.setBrush(QPalette::Disabled, QPalette::Text, dark); palette.setBrush(QPalette::Disabled, QPalette::ButtonText, dark); -- 2.11.0