143{
144 Q_UNUSED(event);
145
146 const QRect
bounds =
m_d->boundingRect();
147 const QColor backgroundColor =
palette().color(QPalette::Base);
148
149
151
152 {
153
154 QStyleOptionViewItem option;
155 const int gridHint = style()->styleHint(QStyle::SH_Table_GridLineColor, &option, this);
156 const QColor gridColor =
static_cast<QRgb>(gridHint);
157 const QPen gridPen(gridColor);
158
160 p.setBrush(backgroundColor);
162 }
163
164 {
165 QRect sliderRect =
m_d->sliderRect();
166 const int sliderPos = QStyle::sliderPositionFromValue(minimum(), maximum(),
value(), sliderRect.height());
167 sliderRect.adjust(0, sliderRect.height() - sliderPos, 0, 0);
168
169 p.setPen(Qt::transparent);
170
171 QColor color =
m_d->toggleState ?
175
176 p.drawRect(sliderRect);
177 }
178
179 QString textValue = QString::number(
value());
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201 if (hasFocus()) {
202 QStyleOptionFocusRect fropt;
203 fropt.initFrom(this);
204 fropt.backgroundColor = backgroundColor;
205
206 int dfw1 = style()->pixelMetric(QStyle::PM_DefaultFrameWidth, &fropt, this) + 1,
207 dfw2 = dfw1 * 2;
209
210 style()->drawPrimitive(QStyle::PE_FrameFocusRect, &fropt, &
p,
this);
211 }
212}
QColor onionSkinsSliderEnabledColor() const
QColor onionSkinsSliderDisabledColor() const
static KisAnimTimelineColors * instance()
T kisGrowRect(const T &rect, U offset)
rgba palette[MAX_PALETTE]