68{
69 Q_UNUSED(event);
71 const QRect filling =
m_d->fillingRect();
72 const QColor backgroundColor =
palette().color(QPalette::Base);
73
75
76 {
77
78 QStyleOptionViewItem option;
79 const int gridHint = style()->styleHint(QStyle::SH_Table_GridLineColor, &option, this);
80 const QColor gridColor =
static_cast<QRgb>(gridHint);
81 const QPen gridPen(gridColor);
82
84 p.setBrush(backgroundColor);
86 }
87
88 {
91
92 if (isChecked() || hasFocus() ||
m_d->isHovering) {
93 p.setPen(hasFocus() ||
m_d->isHovering ? frameColor : Qt::transparent);
94 p.setBrush(isChecked() ? fillColor : Qt::transparent);
96 }
97 }
98
99 QString textValue = text();
100
101 {
102 QPalette::ColorRole textRole = QPalette::Text;
103
104
106 shadowRect.translate(1,1);
107 QColor textColor =
palette().color(textRole);
108 QColor shadowColor = (textColor.value() <= 128)
109 ? QColor(255,255,255,160) : QColor(0,0,0,160);
110
111 int flags = Qt::AlignCenter | Qt::TextHideMnemonic;
112
113 p.setPen(shadowColor);
114 p.drawText(shadowRect, flags, textValue);
115
117 p.drawText(
bounds, flags, textValue);
118 }
119}
QColor onionSkinsButtonColor() const
static KisAnimTimelineColors * instance()
rgba palette[MAX_PALETTE]