51 { |
51 { |
52 QColor faceColor = color.faceColor(); |
52 QColor faceColor = color.faceColor(); |
53 |
53 |
54 if (color == MainColor) |
54 if (color == MainColor) |
55 { |
55 { |
56 faceColor = ::config->mainColor(); |
56 faceColor = config::mainColor(); |
57 faceColor.setAlphaF(::config->mainColorAlpha()); |
57 faceColor.setAlphaF(config::mainColorAlpha()); |
58 } |
58 } |
59 |
59 |
60 QString edgeColor = luma(faceColor) < 80 ? "white" : "black"; |
60 QString edgeColor = luma(faceColor) < 80 ? "white" : "black"; |
61 button->setAutoFillBackground(true); |
61 button->setAutoFillBackground(true); |
62 button->setStyleSheet(format( |
62 button->setStyleSheet(format( |