MCPcopy Create free account
hub / github.com/ElementsProject/elements / SingleColor

Method SingleColor

src/qt/platformstyle.cpp:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83QColor PlatformStyle::SingleColor() const
84{
85 if (colorizeIcons) {
86 const QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight));
87 const QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText));
88 const QColor colorText(QApplication::palette().color(QPalette::WindowText));
89 const int colorTextLightness = colorText.lightness();
90 if (abs(colorHighlightBg.lightness() - colorTextLightness) < abs(colorHighlightFg.lightness() - colorTextLightness)) {
91 return colorHighlightBg;
92 }
93 return colorHighlightFg;
94 }
95 return {0, 0, 0};
96}
97
98QImage PlatformStyle::SingleColorImage(const QString& filename) const
99{

Callers 2

changeEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected