53 { |
53 { |
54 QColor color (ldcolor.faceColor()); |
54 QColor color (ldcolor.faceColor()); |
55 |
55 |
56 if (ldcolor == MainColor) |
56 if (ldcolor == MainColor) |
57 { |
57 { |
58 color = QColor (Config->mainColor()); |
58 color = QColor (config.mainColor()); |
59 color.setAlphaF (Config->mainColorAlpha()); |
59 color.setAlphaF (config.mainColorAlpha()); |
60 } |
60 } |
61 |
61 |
62 QString color2name (luma (color) < 80 ? "white" : "black"); |
62 QString color2name (luma (color) < 80 ? "white" : "black"); |
63 button->setAutoFillBackground (true); |
63 button->setAutoFillBackground (true); |
64 button->setStyleSheet (format ("background-color: rgba(%1, %2, %3, %4); color: %5", |
64 button->setStyleSheet (format ("background-color: rgba(%1, %2, %3, %4); color: %5", |