src/dialogs/colorselector.cpp

changeset 996
9ecc878c7dea
parent 984
a7b6f987d269
child 1010
969b48eddd6b
equal deleted inserted replaced
995:7986584e7498 996:9ecc878c7dea
57 { 57 {
58 color = QColor (m_config->mainColor()); 58 color = QColor (m_config->mainColor());
59 color.setAlphaF (m_config->mainColorAlpha()); 59 color.setAlphaF (m_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",
65 color.red(), color.green(), color.blue(), color.alpha(), color2name)); 65 color.red(), color.green(), color.blue(), color.alpha(), color2name));
66 button->setCheckable (true); 66 button->setCheckable (true);
67 button->setText (QString::number (ldcolor.index())); 67 button->setText (QString::number (ldcolor.index()));

mercurial