- QBrush brush;
- if(isEnabled()) {
- brush = QBrush(_color);
- } else {
- brush = QBrush(_color, Qt::Dense4Pattern);
- }
- painter.fillRect(rect().adjusted(border+1, border+1, -border-1, -border-1), brush);
- QStyleOptionFrame option;
- option.state = QStyle::State_Sunken;
- option.rect = rect().adjusted(border, border, -border, -border);